Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Go back to previous page

If by page you mean tab or worksheet, then in a standard module enter:

Public neew As Range
Public old As Range

Sub goback()
old.Parent.Activate
End Sub

Sub init()
Set neew = Selection
End Sub

and in each worksheet enter:

Private Sub Worksheet_Activate()
Set old = neew
Set neew = Selection
End Sub

First run init(), then move from tab to tab all you like. Run goback() to
get back to the previous tab.
--
Gary's Student


"jweasl" wrote:

I need a macro that will take me back to the page I was previously on. I have
about 30 pages total, and you often move from one to the next in no
particular order. Many times I will run macros on the page before needing to
go back as well.

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
Go back to the previous excel file houghi Excel Discussion (Misc queries) 2 March 6th 09 04:25 PM
go back/previous cell jasminesy Excel Programming 4 May 24th 06 04:02 PM
Revert back to previous file version vamorv2004 Excel Discussion (Misc queries) 2 May 17th 05 02:07 AM
Go back to previous worksheet BarryL New Users to Excel 2 May 5th 05 01:38 AM
Roll back to previous date Jay Excel Worksheet Functions 2 December 3rd 04 03:35 PM


All times are GMT +1. The time now is 08:43 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"