Hey All,
I have the below code:
my understanding of global variables is that they are saved and available to all modules within the workbook. When I try to test this variable to see if it stored the correct value with a msgbox in a new worksheet, the message box returns a blank value.
does anyone know why the workbook open event would not be storing this variable?
I have the below code:
Code:
Option Explicit
Public lr As Long
Private Sub Workbook_Open()
Let lr = Range("A" & Rows.Count).End(xlUp).Row
End Sub
my understanding of global variables is that they are saved and available to all modules within the workbook. When I try to test this variable to see if it stored the correct value with a msgbox in a new worksheet, the message box returns a blank value.
does anyone know why the workbook open event would not be storing this variable?