ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Sheet Codenames (https://www.excelbanter.com/excel-programming/439215-sheet-codenames.html)

Annie Whitley

Sheet Codenames
 
Hi everyone,

I've got a workbook in which other users may rename sheets so I want to
change all tab names to codenames in VBA modules.

I've read that I can do it using Find/Replace in the VBE but what I wanted
to know is whether I need to tell it I'm using the codename for sheets.

If I have to (or should) how would I do it?
--
Thank you
Annie

Per Jessen

Sheet Codenames
 
Hi Annie

With a worksheet level sheet name the syntax is:

Worksheets("Sheet1").Select

With a VBA level code names the syntas is:

Sheet1.Select

Hopes this helps.
....
Per

"Annie Whitley" skrev i meddelelsen
...
Hi everyone,

I've got a workbook in which other users may rename sheets so I want to
change all tab names to codenames in VBA modules.

I've read that I can do it using Find/Replace in the VBE but what I wanted
to know is whether I need to tell it I'm using the codename for sheets.

If I have to (or should) how would I do it?
--
Thank you
Annie



Annie Whitley

Sheet Codenames
 
That did help thank you Per :-)
--
Thank you
Annie


"Per Jessen" wrote:

Hi Annie

With a worksheet level sheet name the syntax is:

Worksheets("Sheet1").Select

With a VBA level code names the syntas is:

Sheet1.Select

Hopes this helps.
....
Per

"Annie Whitley" skrev i meddelelsen
...
Hi everyone,

I've got a workbook in which other users may rename sheets so I want to
change all tab names to codenames in VBA modules.

I've read that I can do it using Find/Replace in the VBE but what I wanted
to know is whether I need to tell it I'm using the codename for sheets.

If I have to (or should) how would I do it?
--
Thank you
Annie


.



All times are GMT +1. The time now is 11:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com