Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default name prefix for DA

And yet one more possibility...

Sub Test()
Dim wks As Worksheet
For Each wks In ThisWorkbook.Worksheets
If wks.Visible And InStr(1, "*IS-*BS-*CV-*CAS*EXE*", _
"*" & Left(wks.Name, 3) & "*", vbTextCompare) 0 Then
'
' Your code goes here
'
End If
Next
End Sub

Rick


"Dean" wrote in message
...
I have an if, then loop that has a condition that, if a sheet in the
workbook is visible, then do some things. It uses a "wks", such as if
wks.visible = true, then

wks.protect. If not, then move along to the next wks, and that sort of
thing.

I want to add another condition beyond it being visible Specifically, if
the worksheet's name's first 3 characters are NOT one of the following
five choices, then I also want to skip the operations.

IS-
BS-
CV-
CAS
EXE

Can someone tell me that syntax, please?

Thanks!
Dean




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
Prefix dleo Excel Discussion (Misc queries) 0 July 1st 09 05:18 PM
omit the ns1: prefix Gerald Piotrowski Excel Discussion (Misc queries) 0 March 5th 08 07:22 PM
SUM without prefix Boris Excel Discussion (Misc queries) 3 January 2nd 08 11:40 AM
VBA - xl Prefix ajocius[_43_] Excel Programming 1 November 26th 05 08:27 PM
Prefix Big Boss Excel Worksheet Functions 4 August 11th 05 03:05 AM


All times are GMT +1. The time now is 09:42 PM.

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"