Hi
I'm using the below formula for selection change in VBA - it works fine but everytime I click on Column A & B than it comes up with error message - Runtime error 1004. Highlights this line : Dim cel As Range: Set cel = Target.Offset(, -2)
Please can someone guide me.
Thank you
I'm using the below formula for selection change in VBA - it works fine but everytime I click on Column A & B than it comes up with error message - Runtime error 1004. Highlights this line : Dim cel As Range: Set cel = Target.Offset(, -2)
VBA Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Selection.CountLarge > 1 Then Exit Sub
Dim cel As Range: Set cel = Target.Offset(, -2)
If Not Intersect(Target, Range("U7:U37")) Is Nothing Then
If cel = "" Then
cel.Select
MsgBox "test"
End If
End If
Application.CutCopyMode = False
End Sub
Please can someone guide me.
Thank you