View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Barb Reinhardt Barb Reinhardt is offline
external usenet poster
 
Posts: 3,355
Default how to dynamically get sheet name

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

--
HTH,
Barb Reinhardt



"LetMeDoIt" wrote:

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