![]() |
Macro Creation
I currently have code in VB to position me to the next cell row (1) after i
reach Row 10 in any given cell. Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Row = 11 Then Target.Offset(1 - Target.Row, 1).Select End If End Sub How do I also incorporate a Ctrl+Shift+J to jump to the next cell row(1) if I want to manually do it before reaching Row 10 in any cell? Your help is much appreciated. |
Sub Row1()
Application.Goto Cells(1, ActiveCell.Column) End Sub -- HTH RP (remove nothere from the email address if mailing direct) "Programming Cells" wrote in message ... I currently have code in VB to position me to the next cell row (1) after i reach Row 10 in any given cell. Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Row = 11 Then Target.Offset(1 - Target.Row, 1).Select End If End Sub How do I also incorporate a Ctrl+Shift+J to jump to the next cell row(1) if I want to manually do it before reaching Row 10 in any cell? Your help is much appreciated. |
Do I have this as another Sub under my VB code in the work sheet or does this
get included in my Macro? Sorry for the questions. Sub MyMacro() ' MyMacro Macro ' Macro recorded 7/28/2005 by markl ' ' Keyboard Shortcut: Ctrl+Shift+J ' End Sub Sub Row1() Application.Goto Cells(1, ActiveCell.Column) End Sub "Bob Phillips" wrote: Sub Row1() Application.Goto Cells(1, ActiveCell.Column) End Sub -- HTH RP (remove nothere from the email address if mailing direct) "Programming Cells" wrote in message ... I currently have code in VB to position me to the next cell row (1) after i reach Row 10 in any given cell. Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Row = 11 Then Target.Offset(1 - Target.Row, 1).Select End If End Sub How do I also incorporate a Ctrl+Shift+J to jump to the next cell row(1) if I want to manually do it before reaching Row 10 in any cell? Your help is much appreciated. |
No just put that code in myMacro.
-- HTH RP (remove nothere from the email address if mailing direct) "Programming Cells" wrote in message ... Do I have this as another Sub under my VB code in the work sheet or does this get included in my Macro? Sorry for the questions. Sub MyMacro() ' MyMacro Macro ' Macro recorded 7/28/2005 by markl ' ' Keyboard Shortcut: Ctrl+Shift+J ' End Sub Sub Row1() Application.Goto Cells(1, ActiveCell.Column) End Sub "Bob Phillips" wrote: Sub Row1() Application.Goto Cells(1, ActiveCell.Column) End Sub -- HTH RP (remove nothere from the email address if mailing direct) "Programming Cells" wrote in message ... I currently have code in VB to position me to the next cell row (1) after i reach Row 10 in any given cell. Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Row = 11 Then Target.Offset(1 - Target.Row, 1).Select End If End Sub How do I also incorporate a Ctrl+Shift+J to jump to the next cell row(1) if I want to manually do it before reaching Row 10 in any cell? Your help is much appreciated. |
All times are GMT +1. The time now is 08:36 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com