Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Set isect = Application.Intersect(Target, Range("A1:B10"))
If Not isect Is Nothing Then
MsgBox Target.Address
End If
End Sub
This is a variation on the question you asked yesterday. Using a variation of
the code I posted there should work:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Select Case ActiveCell.Column
Case 1, 2
If ActiveCell.Row < 11 Then
'your code here
End If
End Select
End Sub
Put that in the worksheet's class and put your code where it says "your code
here".
This is a variation on the question you asked yesterday. Using a
variation of the code I posted there should work:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Select Case ActiveCell.Column
Case 1, 2
If ActiveCell.Row < 11 Then
'your code here
End If
End Select
End Sub
Put that in the worksheet's class and put your code where it says "your
code here".
If Not Intersect(Target, Range("A1:B10")) Is Nothing Then _
MsgBox Target.Address
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.