ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Macro to return to original cell (https://www.excelbanter.com/excel-discussion-misc-queries/260408-macro-return-original-cell.html)

Tonso

Macro to return to original cell
 
I have an xl2003 workbook that is rather complex. I would like to have
a "Help" button on the main worksheet, worksheet "A", that would would
go to another worksheet named "Help", which would contain other
buttons linking to different Help topics on worksheet "Help". When the
user is finished getting help, i would like to have another button
that would, when selected, take the user from where ever he was on he
"Help" worksheet, back to the cell they were at on worksheet "A". I
would surely appreciate some "help" on this subject.

Thanks so much,

Tonso

ozgrid.com

Macro to return to original cell
 
At the very top of a standard module enter;
Public rCell as Range

In the ThisWorkbook Module;
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target
As Range)
On Error Resume Next
If Sh.Name < "Help" Then Set rCell = Target(1, 1)
On Error GoTo 0
End Sub


In your Macro code;
Application.GoTo rCell


--
Regards
Dave Hawley
www.ozgrid.com
"Tonso" wrote in message
...
I have an xl2003 workbook that is rather complex. I would like to have
a "Help" button on the main worksheet, worksheet "A", that would would
go to another worksheet named "Help", which would contain other
buttons linking to different Help topics on worksheet "Help". When the
user is finished getting help, i would like to have another button
that would, when selected, take the user from where ever he was on he
"Help" worksheet, back to the cell they were at on worksheet "A". I
would surely appreciate some "help" on this subject.

Thanks so much,

Tonso




All times are GMT +1. The time now is 05:41 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com