Hi
I am clueless when it comes to VBA but found the code below on the MrExcel archives. It works perfectly which is great, but I've got more than one cell to protect, and when I try to cut and paste and change the cell references, it tells me that I've got an ambiguous name - I assume because it's called the same as the first code, but I don't know how to change this without making it not work... can anyone help, without being too tecnical!!!?
thanks
Yvonne
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'Written by OzGrid Business Applications
'www.ozgrid.com
Dim WatchCell As Range
Set WatchCell = Range("B4")
On Error GoTo ResetEvents
If Not Intersect(Target, WatchCell) Is Nothing Then
Application.EnableEvents = False
Range("C4").Select
End If
ResetEvents:
Set WatchCell = Nothing
Application.EnableEvents = True
End Sub
I am clueless when it comes to VBA but found the code below on the MrExcel archives. It works perfectly which is great, but I've got more than one cell to protect, and when I try to cut and paste and change the cell references, it tells me that I've got an ambiguous name - I assume because it's called the same as the first code, but I don't know how to change this without making it not work... can anyone help, without being too tecnical!!!?
thanks
Yvonne
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'Written by OzGrid Business Applications
'www.ozgrid.com
Dim WatchCell As Range
Set WatchCell = Range("B4")
On Error GoTo ResetEvents
If Not Intersect(Target, WatchCell) Is Nothing Then
Application.EnableEvents = False
Range("C4").Select
End If
ResetEvents:
Set WatchCell = Nothing
Application.EnableEvents = True
End Sub