Cursor to upper left of frozen cells (in macro)
Application.ActiveWindow.ScrollRow
and
Application.ActiveWindow.ScrollColumn
will give you the row and column numbers which you can use in your code...
"Shane Devenshire" wrote:
Hi,
Look at the sendkeys command, here is some code:
SendKeys "^{Home}"
--
If this helps, please click the Yes button.
Cheers,
Shane Devenshire
"Mike" wrote:
I have crudely written a macro that takes the cursor to A1 on all worksheets
in a workbook. I'm hoping to add a command that will send the curso to the
upper left of any frozen cells first, then go to A1 (basically I want it to
perform Ctrl-Home first). Does anyone have any advice on this? Below is the
code I am currently using.
Dim wk As Worksheet
For Each wk In ActiveWorkbook.Worksheets
wk.Activate
Range("A1").Select
Next wk
Sheets(1).Activate
Thanks for the help!
|