Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Prefix | Excel Discussion (Misc queries) | |||
omit the ns1: prefix | Excel Discussion (Misc queries) | |||
SUM without prefix | Excel Discussion (Misc queries) | |||
VBA - xl Prefix | Excel Programming | |||
Prefix | Excel Worksheet Functions |