Require data entry in column before moving to next cell

M

MiataDiablo

I found the following code which is exactly what I need but am unsure
how to change it to apply to all of Column A?


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Set b9 = Range("B9")
Set t = Target
If Intersect(t, b9) Is Nothing Then
If checkit Then
If b9.Value = "" Then
Application.EnableEvents = False
b9.Select
Application.EnableEvents = True
Else
checkit = False
End If
End If
Else
checkit = True
End If
End Sub
 
M

Mike H

Maybe this

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 1 Then
MsgBox "Do Something"
End If
End Sub

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top