I have this
in a modole renamed to COLNUMDECLARATIONCODE
and this
at the beginning of ThisWorkbook code. Everything works fine - until this issue...
Issue: as long as the application is live and running colnum is correct and available to all code modules.
But if I have to make an editing change or something else, which causes the application to be put in the DESIGN mode, and then be put back to the live app from the Developer tab, the variable's value no longer exists and defaults to 0.
Is there a way to always keep the correct value of colnum available when popping in and out of Design without having to initiate a Save -> Close ->Reopen the app to regenerate the correct value of colnum?
Thanks for anyone's help
cr
Code:
Public colnum As Long
Sub Callcolnum()
colnum = Round((Date - DateValue("12/20/2017")) / 7, 0)
MsgBox colnum
End Sub
and this
Code:
Private Sub Workbook_Open()
Callcolnum
Issue: as long as the application is live and running colnum is correct and available to all code modules.
But if I have to make an editing change or something else, which causes the application to be put in the DESIGN mode, and then be put back to the live app from the Developer tab, the variable's value no longer exists and defaults to 0.
Is there a way to always keep the correct value of colnum available when popping in and out of Design without having to initiate a Save -> Close ->Reopen the app to regenerate the correct value of colnum?
Thanks for anyone's help
cr