title: Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) and Range error
body: <p>Hoping someone can help with a VBA problem I am having.</p>
  
  <p>I want to change the value for a Named Range when a user double clicks on the cell. There are two worksheets, the initial worksheet with a value in a cell and then the destination worksheet which contains the Named Range Account_Number.</p>
  
  <p>This is my code:</p>
  
  <pre><code>Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
  
      [Account_Number] = ActiveCell.Value 'assign the value to the Named Range
  
      Range([Account_Number]).Select ' go to the Named Range on the other worksheet
  
     'Sheets("Transaction Listing_LINKS").Select 'the workaround to the problem below
  End Sub
  </code></pre>
  
  <p>What I expect is that the Named Range to be populated and selected.</p>
  
  <p>The problem is I get a </p>
  
  <blockquote>
    <p>"1004 error: Method 'Range' of object '_Worksheet' failed"</p>
  </blockquote>
  
  <p>error when I double click on the cell.</p>
  
  <p>The strange thing is that if I only use one worksheet it works without any problems.</p>
  
  <p>Can anyone explain to me why this would happen and how to avoid it?</p>
  
  <p>The only fix/workaround I can think of is to code the selection of the worksheet to force it to select it.</p>
  
  <p>Thank you</p>