Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I wrote a macro to switch between 2 sheets, works well for my file.
I'd like to use it for any workbook and distribute it in the office. I saved the code below as an addin and copy it to ...\Library, then chose it on Tools\Add-ins, but nothing happens, can't find it anywhere. I'd like to assign the macro to a shortcut or a button (ideally ctrl+tab) so I can use it. Thanks. 'in Module1 Public OldSheetName As String Sub ReturnToLastSheet() Worksheets(OldSheetName).Activate End Sub 'in ThisWorkbook Private Sub Workbook_Open() OldSheetName = ActiveSheet.Name End Sub Private Sub Workbook_SheetDeactivate(ByVal Sh As Object) OldSheetName = Sh.Name End Sub *** Furthermore, if people like it, I may want to make it intall and assign shortcut automatically, but have no idea how to do that yet, any hints? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
shortcut key for switching sheets | Excel Discussion (Misc queries) | |||
switching between sheets using the keyboard | Excel Discussion (Misc queries) | |||
Controlling switching to other sheets | Excel Programming | |||
Switching between sheets in same window... | Excel Discussion (Misc queries) | |||
Switching Sheets | Excel Programming |