to Anne and others who do not put info in the message section

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

the system will not let me reply to some messages, especially those wtih
nothing in the message section.
Please repost with something I can respond to.
 
My question is how can I get the home tab to always go back to the same cell
in the worksheet?
 
You can use something like the OnKey method in VBA:

Sub ChangeHome()
Application.OnKey "{Home}", "SelectIt"
End Sub

Sub SelectIt()
Range("A25").Select
End Sub

You can put the ChangeHome Macro in a WorkBook_Open() procedure will run on
opening the workbook.

To change it back use:

Sub EndIt()
Application.OnKey "{Home}"
End Sub


in a Workbook_BeforeClose macro

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 
Seeing it in the NG I see that what I wrote was confusing.

Use the Macros as previously written if you put them in a normal Module. If
you want it to run autoamatically on opening the WorkBook use:

Private Sub Workbook_Open()
Application.OnKey "{Home}", "SelectIt"
End Sub

and

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.OnKey "{Home}"
End Sub

in the ThisWorkbook module

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 
Back
Top