Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 237
Default Specifying 2 sheet names

Hey guys

Below is a working code that says if sheet name in
workbook is "template", then bflag=true. I would like it
to say if sheet name in workbook is "template"
or "variables", then bflag=true

If LCase(sh.Name) = "template" Then bFlag = True

How would I write this?

Thanx

Todd
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 95
Default Specifying 2 sheet names

Todd,

Try a Select Case. E.g.,

Select Case LCase(sh.Name)
Case "template", "variables"
bflag = True
Case Else
bflag = False
End Select



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Todd Huttenstine" wrote in
message ...
Hey guys

Below is a working code that says if sheet name in
workbook is "template", then bflag=true. I would like it
to say if sheet name in workbook is "template"
or "variables", then bflag=true

If LCase(sh.Name) = "template" Then bFlag = True

How would I write this?

Thanx

Todd



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Specifying 2 sheet names

Todd,

Just a simple Or

If LCase(sh.Name) = "template" Or LCase(sh.Name) = "variables" Then
bFlag = True

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Todd Huttenstine" wrote in message
...
Hey guys

Below is a working code that says if sheet name in
workbook is "template", then bflag=true. I would like it
to say if sheet name in workbook is "template"
or "variables", then bflag=true

If LCase(sh.Name) = "template" Then bFlag = True

How would I write this?

Thanx

Todd



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
Sheet Referencing - autofilling sheet names Pat Excel Worksheet Functions 2 June 4th 09 03:50 AM
Cell names = sheet names Vince Excel Worksheet Functions 9 February 8th 08 03:59 PM
Add Names of First Sheet and Automatically Add to Second Sheet Jorge Excel Discussion (Misc queries) 1 October 12th 06 10:48 PM
I want to print out the sheet tabs (sheet names) Sundus Excel Worksheet Functions 3 February 23rd 05 08:34 PM
Sheet names in VBE Tom Ogilvy Excel Programming 0 November 8th 03 01:55 PM


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