View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
JMay JMay is offline
external usenet poster
 
Posts: 468
Default Code not working

I need to capture the Last Row number as soon as the WB opens; And as the
sheet2 Column A cells are filled-in have the variable Lrow furnish an
up-to-date
value, representing the last non-blank row in Col A of Sheet2. The below is
not working; Can yo suggest a better way?

TIA,

Dim Lrow As Long
Private Sub Workbook_Open()
Lrow = Sheets("Sheet2").Cells(Rows.Count, "A").End(xlUp).Row
End Sub