Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One way:
Code in a regular module: Public OldSheetName As String Public mySheetName As String Sub ReturnToLastSheet() Worksheets(OldSheetName).Activate End Sub Code in the Thisworkbook object: Private Sub Workbook_Open() MySheetName = "Sheet1" 'Change as appropriate End Sub Private Sub Workbook_SheetActivate(ByVal Sh As Object) OldSheetName = mySheetName mySheetName = Sh.Name End Sub Then assign the ReturnToLastSheet macro to a button. HTH Otto "Fraggs " wrote in message ... How can I create a generic back button for my workbook, so that it goes to the last view worksheet? Is this even possible? --- Message posted from http://www.ExcelForum.com/ |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro for forward and back button | Excel Discussion (Misc queries) | |||
How can I call IE browser (Back button) through Excel macro? | Excel Discussion (Misc queries) | |||
How can I call IE browser (Back button) through Excel macro? | Excel Discussion (Misc queries) | |||
Reverse a Macro - works like back button | Excel Discussion (Misc queries) | |||
Back Button Macro | Excel Programming |