I have this code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = Range("B1").Address Then _
Range("B1").Value = 10
Range("A1").Select
End Sub
It works fine for place the Value but the problem is that regardless of where I
click on the sheet A1 get selected.
I tried an End If after Range("A1").Select but that generates an error.
Can someone please tell me why the first instruction seems to execute
only when I click on B1 and the second instruction executes anytime I click the sheet in any cell and how I get the code to run as intended.
Bookmarks