Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Moving to Previous Worksheet

Is there a quick way to open the last worksheet you had open prior to the one
you are currently viewing, and toggle between the two sheets? I am looking
for something like the alt+tab command for windows.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,311
Default Moving to Previous Worksheet

I'm assuming you do mean Worksheet, as stated, and not Workbook.

Anyway, you can use some code to do this. I've previously done something
like this with the following:

First, create a sheet named "Data". This sheet can be hidden if you'd like.
Next, press Alt+F11 to bring up the VB editor.
Double-click on "ThisWorkbook".
Paste the following code:

Private Sub Workbook_SheetDeactivate(ByVal Sh As Object)
Sheets("Data").Range("A2").Value = Sheets("Data").Range("A1").Value
Sheets("Data").Range("A1").Value = ActiveSheet.Name
End Sub

Next, right-click "ThisWorkbook" again and goto "Insert" and then select
"Module".
Paste the following code:

Sub ActivateLastSheet()
Sheets(Sheets("Data").Range("A2").Value).Activate
End Sub

Close the VB Editor window.
From your Excel window, click Tools-Macro-Macros.
Select ActivateLastSheet and then click Options.
In this section you can assign a short-cut key to easily access the code
that activates the previous sheet you were on.


Hope this is helpful.
Paul

"Zootie" wrote in message
...
Is there a quick way to open the last worksheet you had open prior to the
one
you are currently viewing, and toggle between the two sheets? I am
looking
for something like the alt+tab command for windows.



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
continue page numbers from previous worksheet tom Excel Discussion (Misc queries) 1 June 23rd 06 04:22 PM
Moving data from from one worksheet to another imills Excel Worksheet Functions 1 January 13th 06 05:19 PM
Moving Objects in a Worksheet Native Excel Discussion (Misc queries) 2 January 11th 06 02:56 AM
How to stop the cursor moving the whole excel worksheet Nigel Buchanan Excel Discussion (Misc queries) 2 July 6th 05 04:40 PM
Search/Match between 2 x separate Worksheets and populate result in third worksheet Alan Bartley Excel Discussion (Misc queries) 1 April 11th 05 05:21 AM


All times are GMT +1. The time now is 04:27 PM.

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"