how to dynamically get sheet name

  • Thread starter Thread starter LetMeDoIt
  • Start date Start date
L

LetMeDoIt

Greetings,

I'm trying dynamically store into a variable the name of the active
sheet. I've tried various combination (based on my less than expert
experience with VBA code).

Any light shed would be greatly appreciated.

regards,
CG
 
I've done this (and not used the name)
Dim aWS as Excel.worksheet

Set aWS = ActiveSheet

Anywhere you've use Activesheet, replace with aWS.

aWS.cells(1,1).value = ...
aws.range("myRange").address
aWS.name
aWS.Parent.Name <~~workbook name
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top