May 4, 2005 #1 ljCharlie IS-IT--Management Joined Apr 21, 2003 Messages 397 Location US Is there a way to automatically detect the worksheet name of a workbook? Here's what I want to do. Dim myWorksheet As Worksheet Now, I want to Set myWorksheet to the currently active worksheet. How do I do this? Help is appreciated. ljCharlie
Is there a way to automatically detect the worksheet name of a workbook? Here's what I want to do. Dim myWorksheet As Worksheet Now, I want to Set myWorksheet to the currently active worksheet. How do I do this? Help is appreciated. ljCharlie
May 4, 2005 #2 PHV MIS Joined Nov 8, 2002 Messages 53,708 Location FR What about this ? Set myWorksheet = ActiveWorksheet Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244 Upvote 0 Downvote
What about this ? Set myWorksheet = ActiveWorksheet Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
May 4, 2005 Thread starter #3 ljCharlie IS-IT--Management Joined Apr 21, 2003 Messages 397 Location US Thanks but that doesn't work. I got an error saying variable not defined on the word "ActiveWorkSheet" ljCharlie Upvote 0 Downvote
Thanks but that doesn't work. I got an error saying variable not defined on the word "ActiveWorkSheet" ljCharlie
May 4, 2005 Thread starter #4 ljCharlie IS-IT--Management Joined Apr 21, 2003 Messages 397 Location US Thanks! I found it. It's ActiveSheet and not ActiveWorkSheet. ljCharlie Upvote 0 Downvote
May 4, 2005 #5 PHV MIS Joined Nov 8, 2002 Messages 53,708 Location FR Sorry for the typo: Set myWorksheet = ActiveSheet Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244 Upvote 0 Downvote
Sorry for the typo: Set myWorksheet = ActiveSheet Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244