hello, I used a VCA formula in my spread sheet. I want to do the exact same thing, but in a different area of the spread sheet. This is the formula i used and it worked in one area, but not the other.
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not Intersect(Target, Range("b12:f12")) Is Nothing Then
Cancel = True
Target.Interior.Color = vbYellow
End If
End Sub
Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
If Not Intersect(Target, Range("b12:f12")) Is Nothing Then
Cancel = True
Target.Interior.Color = Cancel = False
Target.Interior.Color = vbWhite
End If
End Sub
The second area with the range B12:f12, pops up a window that i have a compile errpr" Ambiguous name detected: Worksheet) BeforeDoubleClick. Can you tell me what i need to do with this second area inside the VBA code?
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not Intersect(Target, Range("b12:f12")) Is Nothing Then
Cancel = True
Target.Interior.Color = vbYellow
End If
End Sub
Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
If Not Intersect(Target, Range("b12:f12")) Is Nothing Then
Cancel = True
Target.Interior.Color = Cancel = False
Target.Interior.Color = vbWhite
End If
End Sub
The second area with the range B12:f12, pops up a window that i have a compile errpr" Ambiguous name detected: Worksheet) BeforeDoubleClick. Can you tell me what i need to do with this second area inside the VBA code?