D
Dkline
I have a subroutine called "FileAll". There are three other subroutines that
can call it: "CreateFileAndParameters", "FullInput", and "CreateFile". The
"FileAll" can also be called directly by a command button. So there are four
ways that the "FileAll" routine gets invoked - directly by a command button
or from three other macros.
Within the "FileAll" I now have a UserForm to ask if an additional
subroutine be run. I only want to have the UserForm to NOT appear if the
user selected "FullInput". "FullInput" runs a loop which includes "FileAll"
and I don't want the user to have to sit there and respond to a dialogue
each time through the loop.
So I created a pair of Public booleans:
blnAddToInventory 'set by the userform to indicate if the additional routine
is to run
blnAddToInventoryRun 'set to show or not show the userform
I believe I have to initialize the "blnAddToInventoryRun" in the "FileAll"
macro to TRUE since it used by 3 of 4 ways of starting the "FileAll"
including "FileAll" being called by the command button.
How can I change the initialized value of blnAddToInventoryRun if the user
starts from the "FullInput" macro?
can call it: "CreateFileAndParameters", "FullInput", and "CreateFile". The
"FileAll" can also be called directly by a command button. So there are four
ways that the "FileAll" routine gets invoked - directly by a command button
or from three other macros.
Within the "FileAll" I now have a UserForm to ask if an additional
subroutine be run. I only want to have the UserForm to NOT appear if the
user selected "FullInput". "FullInput" runs a loop which includes "FileAll"
and I don't want the user to have to sit there and respond to a dialogue
each time through the loop.
So I created a pair of Public booleans:
blnAddToInventory 'set by the userform to indicate if the additional routine
is to run
blnAddToInventoryRun 'set to show or not show the userform
I believe I have to initialize the "blnAddToInventoryRun" in the "FileAll"
macro to TRUE since it used by 3 of 4 ways of starting the "FileAll"
including "FileAll" being called by the command button.
How can I change the initialized value of blnAddToInventoryRun if the user
starts from the "FullInput" macro?