Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
my my is offline
external usenet poster
 
Posts: 12
Default hyperlink: back to last worksheet

Hi,

I'm trying to create a hyperlink like the Back button you'd have in an
internet browser. So which ever worksheet I'm in, I want to be able to click
on a link that takes me back to the last worksheet I was on. Is this
possible?

Thanks in advance! :)
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 168
Default hyperlink: back to last worksheet

This could be done using VBA if you're familiar with that. Here is one
way.

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




The only way I know of doing it, though, would be to put a bit of code in
each sheet. In my example, you'd also need a sheet in which the code saves
the current sheet's name prior to changing to another.




"my" wrote in message
...
Hi,

I'm trying to create a hyperlink like the Back button you'd have in an
internet browser. So which ever worksheet I'm in, I want to be able to
click
on a link that takes me back to the last worksheet I was on. Is this
possible?

Thanks in advance! :)



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
can I 'hyperlink' within a workbook from the first worksheet? LavenderBush Excel Worksheet Functions 7 August 5th 07 04:37 PM
How do I get ONLY new info from 1 Worksheet to another automatical Elaine Excel Worksheet Functions 6 July 13th 06 05:45 PM
hyperlink to another worksheet billy boy Excel Worksheet Functions 2 November 25th 05 01:10 PM
worksheet columns changed from letter to number, how change back Ron New Users to Excel 2 May 9th 05 08:35 PM
How do I get a hyperlink to track specific data in a worksheet? Kev Nurse Excel Discussion (Misc queries) 1 February 1st 05 12:08 AM


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