sheetname search question
One way:
Public Sub ActivateJan()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
If UCase(ws.Name) Like "*JAN*" Then
ws.Activate
Exit Sub
End If
Next ws
MsgBox "No JANs found"
End Sub
In article ,
RAP wrote:
Hello,
Trying to find a way, using VBA, to locate and activate a sheet by name,
using a wildcard search.
The workbooks I need to open are not consistently organized and sheet names
are different, but all contain "Jan" thru "Dec" in some form.
Ex: Platform1 (JAN),Platform2 JAN, Platform3Jan, etc...
Much appreciated. - Randy
|