Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Creating a back key
Hi all,
I wish to be able to grab the sheet name so the user can return to that sheet from another. For example, if I go from sheet 3 to sheet 1, hiting "back" will take me back to sheet 3. If I go from sheet 2 to sheet 1, hitting "back" will take me back to sheet 2. I have a lookup file that users will edit then return to the previous screen to see the impact of their changes. Many thanks Kevin |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Creating a back key
...
in thisworkbook code module: Dim lastindex As Long Public Sub DoBack() Worksheets(lastindex).Activate End Sub Private Sub Workbook_Open() lastindex = ActiveSheet.Index End Sub Private Sub Workbook_SheetDeactivate(ByVal Sh As Object) lastindex = Sh.Index End Sub then in macro options assign CTRL-B to DoBack i think the shortcut is easier then a button... -- keepITcool | www.XLsupport.com | keepITcool chello nl | amsterdam Kevin Smith wrote : Hi all, I wish to be able to grab the sheet name so the user can return to that sheet from another. For example, if I go from sheet 3 to sheet 1, hiting "back" will take me back to sheet 3. If I go from sheet 2 to sheet 1, hitting "back" will take me back to sheet 2. I have a lookup file that users will edit then return to the previous screen to see the impact of their changes. Many thanks Kevin |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
copy back macro/roll back | Excel Worksheet Functions | |||
Creating tables based on looking down a column and back across a row | Excel Worksheet Functions | |||
Creating tables based on looking down a column and back across a row | Excel Worksheet Functions | |||
Back Up | Excel Programming | |||
Creating a monthly back up using Auto_close?? | Excel Programming |