• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Activating The Next Cell Down Once Column M Is Reached

I have an excel sheet I simply use at work to track and log jobs.


When the file is opened, I have a code that basically finds the next empty cell in the row and activates it (to ensure the next "thing" to fill in on the tracker is always brought to focus so I don't have to scroll around for it).


However, Column L is the last column, and I was hoping to get help with vba code that will move the cursor back down to the left at the very start to start a new line automatically (i.e. once the end of the row is reached).


This one is super easy and I'm sure I'm explaining this way too complicated.


So again, it basically moves to the empty cell on the right (on auto open), and I would like to get help with a code that drops it down one row at the beginning once the M Column is reached.
 
How's this? Install in the worksheet module.


Private Sub Worksheet_SelectionChange(ByVal Target As Range)

If Intersect(Target, Range("M:M")) Is Nothing Then Exit Sub

If Target.Count > 1 Then Exit Sub


Application.EnableEvents = False

Cells(Target.Row + 1, 1).Select

Application.EnableEvents = True


End Sub
 
Back
Top