I'm trying to add DoubleClick event for a range of cells starting from B:27 to B:x(any number of rows). So I want to restric to only column 'B' starting from row # 27
When any cell in the defined range is clicked I'll update the Target.Value in another cell and call a sub routine.
The current code looks like this. This is from a previous developer and it works in one of the sheet but now I'm creating a similar report on another sheet and it gives me the error
Method 'Range' of object '_Worksheet' failed.
I'm not sure where "DblClikRange"
range is defined, I looked in Module code as well I searched for the word throughout tha VBA code I could not find it.
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Excel.Range, Cancel As Boolean)
If Not Intersect(Target, Range("DblClikRange")) Is Nothing Then
On Error Resume Next
Range("B22") = Target.Value
' call the sub to load data
Call MyDemo
End If
End Sub
Any idea where to look up for this named range variable or how to do this in a different way? Any help would be appreciated.