Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using VBA in Excel to locate a sheet
I want to set up a code to read the contents of a cell and locate the
sheet that matches what's in the cell. For example, if the cell reads "Home", I want it to locate and open the worksheet named Home. How do I do this? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using VBA in Excel to locate a sheet
Sub foo()
Dim MySheet As String On Error GoTo errhandler MySheet = Range("A1").Value Worksheets(MySheet).Activate Exit Sub errhandler: MsgBox "There is no worksheet by this name" End Sub " wrote in message oups.com: I want to set up a code to read the contents of a cell and locate the sheet that matches what's in the cell. For example, if the cell reads "Home", I want it to locate and open the worksheet named Home. How do I do this? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
LOCATE DATA IN ONE SHEET AND APPLY ATTACHED DATA TO ANOTHER | Excel Discussion (Misc queries) | |||
Locate month and year from range of date from another sheet | New Users to Excel | |||
locate excel template | Setting up and Configuration of Excel | |||
Locate all occurrances of a value then transfer to 2nd table on another sheet | Excel Programming | |||
Locate all occurrances of a value then transfer to 2nd table on another sheet | Excel Programming |