Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 204
Default Using sheet reference instead of name

IN the VBE each sheet has a name that looks like "Sheet5(Data)"...
the sheet name is data, and I v=can refer to Sheets("Data"), How can I use
the sheet5 bit - the sheet's 'VB Name'?

Thanks

M

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Using sheet reference instead of name

Use the index number such as

Msgbox Sheets(5).name

If this post helps click Yes
---------------
Jacob Skaria


"Michelle" wrote:

IN the VBE each sheet has a name that looks like "Sheet5(Data)"...
the sheet name is data, and I v=can refer to Sheets("Data"), How can I use
the sheet5 bit - the sheet's 'VB Name'?

Thanks

M

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 523
Default Using sheet reference instead of name

Sheets(5)


"Michelle" wrote:

IN the VBE each sheet has a name that looks like "Sheet5(Data)"...
the sheet name is data, and I v=can refer to Sheets("Data"), How can I use
the sheet5 bit - the sheet's 'VB Name'?

Thanks

M

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 204
Default Using sheet reference instead of name

No guys, this is just theindex position of the sheet within the book and it
changes according to where the sheet comes in the book.

I am looking for a way of refering to the sheet regardless of its name or
position.

Any ideas?

M


"Sam Wilson" wrote in message
...
Sheets(5)


"Michelle" wrote:

IN the VBE each sheet has a name that looks like "Sheet5(Data)"...
the sheet name is data, and I v=can refer to Sheets("Data"), How can I
use
the sheet5 bit - the sheet's 'VB Name'?

Thanks

M


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 523
Default Using sheet reference instead of name

Ah,

..codename

sub test

dim ws as worksheet
for each ws in activebook.worksheets
msgbox ws.codename & " - " & ws.name
next ws

end sub


"Michelle" wrote:

No guys, this is just theindex position of the sheet within the book and it
changes according to where the sheet comes in the book.

I am looking for a way of refering to the sheet regardless of its name or
position.

Any ideas?

M


"Sam Wilson" wrote in message
...
Sheets(5)


"Michelle" wrote:

IN the VBE each sheet has a name that looks like "Sheet5(Data)"...
the sheet name is data, and I v=can refer to Sheets("Data"), How can I
use
the sheet5 bit - the sheet's 'VB Name'?

Thanks

M


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
Loop for formula on one sheet with reference from another sheet Valerie Excel Programming 1 August 28th 08 05:22 PM
Nesting a sheet name reference within a cell reference??? Broyston Excel Discussion (Misc queries) 9 July 8th 08 08:35 PM
How To make a sheet reference Variable (eq: sum(sheet!D2:H2)) John Linker Excel Discussion (Misc queries) 3 June 16th 08 11:29 PM
Changing sheet reference to cell reference TeeJay Excel Worksheet Functions 3 October 19th 07 11:50 AM
Relative Sheet Reference (Summary Sheet) [email protected] Excel Discussion (Misc queries) 2 October 1st 05 10:42 AM


All times are GMT +1. The time now is 09:21 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"