ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Sheet Name (https://www.excelbanter.com/excel-programming/306249-re-sheet-name.html)

Jeff Standen

Sheet Name
 
strWksName=activesheet.name
<code here
sheets(strWksName).activate

Not sure what you mean by the second bit. The Object Browser lets you see
the properties and methods of your objects, but I try to just use the
intelligent dropdown. That being said, activesheet (along with selection)
don't have dropdowns, as they are ambiguous items (as they would be
worksheets, charts etc).

Cheers,

Jeff

"Jonathan Cooper" wrote in
message ...
I'm trying to learn VBA for Excel. I've got a macro mostly hacked

together.
There is one part I can't figure out though.

When the macro runs, I want to capture the active worksheet name and store
it in a variable. Then after the macro finishes, I want to go back and
select that sheet again. Seems like such a simple thing to do but I can't
figure out where the darn worksheet name is stored.

Also, since I'm just learning VBA, if you could tell me how I should have
been able to figure out where the name is stored, that would be even

better.




All times are GMT +1. The time now is 10:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com