Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default how to dynamically get sheet name

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default how to dynamically get sheet name

Maybe

MyName = ActiveSheet.Name

Mike

"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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default how to dynamically get sheet name

thank you. that was simple.

regards, CG
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default how to dynamically get sheet name

Glad I could help

"LetMeDoIt" wrote:

thank you. that was simple.

regards, CG

  #5   Report Post  
Posted to microsoft.public.excel.programming
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sheet name, creating dynamically to be used in formula.... Kedar Agarkar Excel Programming 3 January 2nd 08 06:46 AM
dynamically select sheet swtrader Excel Programming 2 October 24th 06 09:50 PM
Transfer/Copy Sheet, Dynamically linked Sheet 0-0 Wai Wai ^-^ Excel Discussion (Misc queries) 2 December 23rd 05 10:04 PM
creating a combobox dynamically on an excel sheet gupt New Users to Excel 8 June 7th 05 04:07 AM
Dynamically display subset rows from one sheet in another sheet? lothario Excel Programming 2 October 11th 03 03:31 PM


All times are GMT +1. The time now is 04:42 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"