LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 395
Default Syntax to match sheet by codename

Sometimes I use parens just out of habit- when I have more complicated logic,
it helps me keep track, but certainly not necessary here.

I need to refence by codename, not sheetname- my users may change the
sheetname so I don't want to hardcode those into my VBA. That put me on the
right track though- "sht.codename" does what I was looking for.

Thank you,
Keith

"tompl" wrote:

I would dump the three variables you set up as they are redundant and use
this language:

If sht.Name = "Sheet2" Or sht.Name = "Sheet4" or sht.Name = €śSheet17€ť Then

I have not seen the use of parenthesis where you have them.

Tom

 
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
Selecting Sheet By Codename Kris_Wright_77 Excel Programming 4 December 16th 09 04:23 PM
Hide sheet via codename [email protected] Excel Programming 3 September 13th 06 08:28 PM
Use of sheet codename in codeline - How? Jim May Excel Programming 3 July 1st 06 04:24 PM
Selecting a sheet by codename Dr.Schwartz Excel Programming 3 September 3rd 04 02:15 PM
Using sheet codename problems Dustin Carter Excel Programming 1 February 20th 04 10:26 PM


All times are GMT +1. The time now is 06:16 AM.

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

About Us

"It's about Microsoft Excel"