title: Subscript out of range Error after renaming sheets
body: <p>I have done a small project, which consists of 5 excel sheet in, code is working fine and I am getting exact result also, but if I rename sheets from sheet1 to some other name I am getting Subscript out of range Error.</p>
  
  <p>What is the reason for this and what needs to be done to overcome this. Please help.</p>
  
  <p>Below is the code</p>
  
  <pre><code>Public  Sub amount_final()
  
  Dim Row1Crnt As Long
  Dim Row2Crnt As Long
  
  
  With Sheets("sheet4")
  Row1Last = .Cells(Rows.Count, "B").End(xlUp).Row
  End With
  
  Row1Crnt = 2
  With Sheets("sheet3")
  Row2Last = .Cells(Rows.Count, "B").End(xlUp).Row
  End With
  </code></pre>