Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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! |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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! |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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! |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
SendKeys isn't working for me.. Sheeloo, can you give me an example of how
to use those commands in my code? "Sheeloo" wrote: 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! |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Sub ctrlHome()
Cells(Application.ActiveWindow.ScrollRow, _ Application.ActiveWindow.ScrollColumn).Select End Sub will take you to the tol-left cell below the frozen pane... that is what you wanted, right? Basically Application.ActiveWindow.ScrollRow gives you the rowno and Application.ActiveWindow.ScrollColumn gives you the columnno of the first cell... "Mike" wrote: SendKeys isn't working for me.. Sheeloo, can you give me an example of how to use those commands in my code? "Sheeloo" wrote: 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! |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thanks for the help, but it's still not doing what I want. That does take me
to the top-left cell of the frozen pane, but what I really want is to take the cursor to the first frozen cell (where it would take you if you pressed Ctrl+Home). SendKeys actually does work, but my hotkey is Ctrl-Shift-H, so by holding shift I highlight everything from the "Home" cell to A1... can I fix this? "Sheeloo" wrote: Sub ctrlHome() Cells(Application.ActiveWindow.ScrollRow, _ Application.ActiveWindow.ScrollColumn).Select End Sub will take you to the tol-left cell below the frozen pane... that is what you wanted, right? Basically Application.ActiveWindow.ScrollRow gives you the rowno and Application.ActiveWindow.ScrollColumn gives you the columnno of the first cell... "Mike" wrote: SendKeys isn't working for me.. Sheeloo, can you give me an example of how to use those commands in my code? "Sheeloo" wrote: 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! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Cursor movement frozen | Excel Discussion (Misc queries) | |||
Third left part of the screen is frozen | Excel Discussion (Misc queries) | |||
I have arrowheads in upper left of some cells. How can I remove? | Excel Discussion (Misc queries) | |||
Remove green mark upper left several cells Excel? | Excel Worksheet Functions | |||
How to change location A1 cell from upper right to upper left? | Excel Discussion (Misc queries) |