Thread: sheet names
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default sheet names

Hi drabbacs

Don't know if you want this ??

You can use this run code on all sheets that start with "Mobile"

Sub test()
Dim sh As Worksheet
For Each sh In ThisWorkbook.Worksheets
If Left(sh.Name, 6) = "Mobile" Then

MsgBox sh.Name
'your code

End If
Next sh
End Sub


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"drabbacs" wrote in message ...
How would I make the "020304" portion of the sheet name in
the following command into a wildcard?

Sheets("Mobile 020304").Select

That is, I want a command that would work with "Mobile
020304" or "Mobile 021004".

I tried "Mobile "& "*" and "Mobile " & "?" but no luck.

Thanks in advance
Drabbacs