Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Search for worksheet in workbook
I am trying to search a workbook for a specific tab name, and activate that tab. If that tab does not exist, I would like to exit the sub. I have the following code, but it does not find the tab when it exists....can u help? Dim sh As Worksheet For Each sh In ThisWorkbook.Worksheets If sh.Visible = xlSheetVisible Then If sh.Name = "My Template" Then sh.Select Worksheets("My Template").Activate Exit For End If MsgBox ("The ""My Template"" tab cannot be found in this workbook.") Exit Sub End If Next |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
I need an Equation in a cell to search a workbook not worksheet | Excel Worksheet Functions | |||
Search 1 worksheet then another for data in large workbook | Excel Programming | |||
Search Data from one Workbook and copy it into another Workbook | Excel Discussion (Misc queries) | |||
Create a search Field within a worksheet to search command buttons | Excel Programming | |||
Need to search workbook for NEW worksheet | Excel Programming |