title: How to change the row number in range as variable?
body: <p>I want to change range row number as a variable,&amp; get it defined in another sheet,how do I do that ? (in following example "D2:D1999",I want to specify "2" in another sheet and include in vb code.)  </p>
  
  <pre><code>Sub Del()
      Dim rng As Range
      Dim x As Long
  
  
      With Sheets("RCSamples")
  
          Set rng = .Range("D2:D1999")
  
  
          rng.EntireRow.Delete
  
      End With
  End Sub
  </code></pre>