Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy back macro/roll back moh Excel Worksheet Functions 4 March 5th 07 02:19 PM
Creating tables based on looking down a column and back across a row thecrow Excel Worksheet Functions 0 January 23rd 07 05:20 PM
Creating tables based on looking down a column and back across a row thecrow Excel Worksheet Functions 0 January 23rd 07 05:19 PM
Back Up Robin Clay[_3_] Excel Programming 4 August 9th 04 03:07 PM
Creating a monthly back up using Auto_close?? Simon Lloyd[_521_] Excel Programming 9 July 9th 04 09:23 PM


All times are GMT +1. The time now is 08:54 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"