title: Set a range for BeforeDoubleClick
body: <p>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</p>
  
  <p>When any cell in the defined range is clicked I'll update the Target.Value in another cell and call a sub routine.</p>
  
  <p>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</p>
  
  <pre><code>Method 'Range' of object '_Worksheet' failed.
  </code></pre>
  
  <p>I'm not sure where <code>"DblClikRange"</code> range is defined, I looked in Module code as well I searched for the word throughout tha VBA code I could not find it.</p>
  
  <pre><code>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
  </code></pre>
  
  <p>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.</p>