Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Is there a way for a macro to goto a Tab that is listed in a cel.
Example: A5 has the name Jay and I want to goto the Jay tab. Thanks in advance |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Ed,
Try code like On Error Resume Next With ThisWorkbook.Worksheets .Item(.Item("Sheet1").Range("A5").Value).Select End With If Err.Number < 0 Then MsgBox Err.Description End If It reads the contents of A5 on Sheet1 and activates the sheet named in that cell. -- Cordially, Chip Pearson Microsoft Most Valuable Professional Excel Product Group Pearson Software Consulting, LLC www.cpearson.com (email on web site) "Ed Davis" wrote in message ... Is there a way for a macro to goto a Tab that is listed in a cel. Example: A5 has the name Jay and I want to goto the Jay tab. Thanks in advance |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
This workes great.
Thank You "Chip Pearson" wrote in message ... Ed, Try code like On Error Resume Next With ThisWorkbook.Worksheets .Item(.Item("Sheet1").Range("A5").Value).Select End With If Err.Number < 0 Then MsgBox Err.Description End If It reads the contents of A5 on Sheet1 and activates the sheet named in that cell. -- Cordially, Chip Pearson Microsoft Most Valuable Professional Excel Product Group Pearson Software Consulting, LLC www.cpearson.com (email on web site) "Ed Davis" wrote in message ... Is there a way for a macro to goto a Tab that is listed in a cel. Example: A5 has the name Jay and I want to goto the Jay tab. Thanks in advance |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I know the OP has an answer, but I wanted to post (for the archives) a
method that does not require error checking... Dim WS As Worksheet For Each WS In Worksheets If WS.Name = Worksheets("Sheet1").Range("A5").Value Then WS.Select Exit For End If Next -- Rick (MVP - Excel) "Ed Davis" wrote in message ... Is there a way for a macro to goto a Tab that is listed in a cel. Example: A5 has the name Jay and I want to goto the Jay tab. Thanks in advance |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
goto (F5) question | Excel Discussion (Misc queries) | |||
GOTO with Macros | Excel Discussion (Misc queries) | |||
Goto code | Excel Discussion (Misc queries) | |||
Excel GOTO | Excel Discussion (Misc queries) | |||
If.....Then GoTo....... | Excel Discussion (Misc queries) |