View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
TomPl TomPl is offline
external usenet poster
 
Posts: 342
Default Syntax to match sheet by codename

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