My macro-enabled excel has 2 separate executable sections of Code.
First section executed upon opening the file. Then Stops.
The file remains open so that the user can check the results in a table at that time.
Once the results are verified, the user pressed ctrl-r to resume execution.
The problem I hit was the global variables that were set in the first section, do not
retaining their settings when the first section stops, and the second section starts.
Rather than prompting the user for the variables' values I save the values in a worksheet, as seen here:
Column A is the name of the already defined global variable.
Column B is the value the variable is set to.
My thinking was to reset the variables as such:
Cells(2, 1).Value = Cells(2, 2).Value
but this would only gave cell A2 the value in cell B2.
I want to use the value in A2 as a reference to the global var "ProgramFile"
and set that variable to "Checks To TD.xlsm".
I've been able to make this work using a Select Statement, but it's a bit kludgy...
Is it possible to read cell A2 as an already defined variable and assign a value to it?
Thank you in advance.
First section executed upon opening the file. Then Stops.
The file remains open so that the user can check the results in a table at that time.
Once the results are verified, the user pressed ctrl-r to resume execution.
The problem I hit was the global variables that were set in the first section, do not
retaining their settings when the first section stops, and the second section starts.
Rather than prompting the user for the variables' values I save the values in a worksheet, as seen here:
Column A is the name of the already defined global variable.
Column B is the value the variable is set to.
My thinking was to reset the variables as such:
Cells(2, 1).Value = Cells(2, 2).Value
but this would only gave cell A2 the value in cell B2.
I want to use the value in A2 as a reference to the global var "ProgramFile"
and set that variable to "Checks To TD.xlsm".
I've been able to make this work using a Select Statement, but it's a bit kludgy...
Is it possible to read cell A2 as an already defined variable and assign a value to it?
Thank you in advance.