View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Sandy Mann Sandy Mann is offline
external usenet poster
 
Posts: 2,345
Default to Anne and others who do not put info in the message section

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


Replace @mailinator.com with @tiscali.co.uk


"Sandy Mann" wrote in message
...
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


Replace @mailinator.com with @tiscali.co.uk


"Anne" wrote in message
...
My question is how can I get the home tab to always go back to the same
cell
in the worksheet?

"bj" wrote:

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.