J
jlclyde
Can you set a variable when a workbook opens? I have been trying to
set a LstRow as long variabel to be used by multiple modules on open
and I cna not seem to get it to work. Here is what I have in the
workbook module. I have many macros that call out for LstRow and
assumed it woudl be easier to set it in one shot and then call it crom
each of the macros going forward.
Option Explicit
Public LstRow As Long
Private Sub Workbook_Open()
LstRow = Sheet1.UsedRange.Rows.Count
End Sub
Thanks,
Jay
set a LstRow as long variabel to be used by multiple modules on open
and I cna not seem to get it to work. Here is what I have in the
workbook module. I have many macros that call out for LstRow and
assumed it woudl be easier to set it in one shot and then call it crom
each of the macros going forward.
Option Explicit
Public LstRow As Long
Private Sub Workbook_Open()
LstRow = Sheet1.UsedRange.Rows.Count
End Sub
Thanks,
Jay