LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 12
Default Getting & Using Sheet Names or Index in VBA code

How do you get each Sheet Name in a Workbook so you can use it in code? I
know that each Sheet, regardless of Name has an Index of 1 through n
beginning with the leftmost Sheet but I don't know how to use that
information.

I have one reference book, Excel 2003 VBA, that says there is a Worksheet
Property 'Name' that returns a String and in the Description of that Property
it says 'Set/Get the name of the worksheet'. Unfortunately, it doesn't tell
me how to use that in code.

I don't really care whether I use the name of each Sheet or the Index but if
you can use either it would be nice to know both ways.

I know a way to write the code if I know the Sheet names but I want the code
to be more flexible so I don't have to 'hard code' them.

Thanks
rw
 
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
Cell names = sheet names Vince Excel Worksheet Functions 9 February 8th 08 03:59 PM
Sheet names code Jonah Excel Discussion (Misc queries) 8 November 4th 06 03:03 AM
VB code to copy sheet format to another sheet ASU Excel Discussion (Misc queries) 12 August 10th 06 02:37 AM
Creating and Index with worksheet names JackR Excel Discussion (Misc queries) 1 February 23rd 06 08:16 PM
I want to print out the sheet tabs (sheet names) Sundus Excel Worksheet Functions 3 February 23rd 05 08:34 PM


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

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"