fred3
Member
I've been using a particular Excel Workbook for some time. I've had to update the VBA code within it to catch up with years of Excel changes.
Now, I'm seeing things like this:
In a Module, I declare variables outside of any procedure - so they should be good throughout the Module, right?
e.g. Dim vbaStartDate As Date at the beginning of the Module in a Module Declaration section.
Then, I assign values to vbaStartDate in a Subroutine using a Function.
I set Watches on vbaStartDate in that Function and in the Subroutine and from the Dim declaration all in the same Module. As I step through the code, they don't match.
This is MS365 desktop Excel. Everything is up to date.
I must be missing something basic here.
Any suggestions?
Now, I'm seeing things like this:
In a Module, I declare variables outside of any procedure - so they should be good throughout the Module, right?
e.g. Dim vbaStartDate As Date at the beginning of the Module in a Module Declaration section.
Then, I assign values to vbaStartDate in a Subroutine using a Function.
I set Watches on vbaStartDate in that Function and in the Subroutine and from the Dim declaration all in the same Module. As I step through the code, they don't match.
This is MS365 desktop Excel. Everything is up to date.
I must be missing something basic here.
Any suggestions?