![]() |
Moving an active cell
I need a snippet of code that will (when you use ctrl-d) look at the active
cell, move the cursor down 9 cells (same column) and make that cell the active cell, no matter where you start on the spreadsheet. Any ideas? Thanks to everyone. -- Howard |
Moving an active cell
ActiveCell.Offset(8).Select
Hope this helps. Otto "Howard" wrote in message ... I need a snippet of code that will (when you use ctrl-d) look at the active cell, move the cursor down 9 cells (same column) and make that cell the active cell, no matter where you start on the spreadsheet. Any ideas? Thanks to everyone. -- Howard |
Moving an active cell
Hi,
Alt+F11 to open VB editor, Right click 'ThisWorkbook' and insert module and paste the code in Sub Move_me() ActiveCell.Offset(9).Select End Sub Back on the worksheet Tools|Macro - Macros - navigate to the macro then 'Options' and assign the shortcut CTRL+D -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "Howard" wrote: I need a snippet of code that will (when you use ctrl-d) look at the active cell, move the cursor down 9 cells (same column) and make that cell the active cell, no matter where you start on the spreadsheet. Any ideas? Thanks to everyone. -- Howard |
Moving an active cell
Put this in the Workbook_Open Event:
Private Sub Workbook_Open() Application.OnKey "^d", "MoveCursor" End Sub Put this in a standard module: Sub MoveCursor() On Error Resume Next ActiveCell.Offset(9).Select End Sub Hope this helps! If so, let me know, click "YES" below. -- Cheers, Ryan "Howard" wrote: I need a snippet of code that will (when you use ctrl-d) look at the active cell, move the cursor down 9 cells (same column) and make that cell the active cell, no matter where you start on the spreadsheet. Any ideas? Thanks to everyone. -- Howard |
Moving an active cell
Thanks to everyone who replied. This solves my problem.
-- Howard "Mike H" wrote: Hi, Alt+F11 to open VB editor, Right click 'ThisWorkbook' and insert module and paste the code in Sub Move_me() ActiveCell.Offset(9).Select End Sub Back on the worksheet Tools|Macro - Macros - navigate to the macro then 'Options' and assign the shortcut CTRL+D -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "Howard" wrote: I need a snippet of code that will (when you use ctrl-d) look at the active cell, move the cursor down 9 cells (same column) and make that cell the active cell, no matter where you start on the spreadsheet. Any ideas? Thanks to everyone. -- Howard |
All times are GMT +1. The time now is 12:29 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com