LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Setting a boolean depending on who called the macro

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?


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how can I insert a macro into a boolean statement Garrett Excel Worksheet Functions 1 December 29th 05 03:46 PM
Worksheet_Change sub does not trigger a called macro herman Excel Programming 3 February 8th 04 08:30 PM
Keeping name of worksheet who called macro Dkline[_2_] Excel Programming 3 January 30th 04 06:40 PM
Sending email via macro- setting the importance setting. Julian Milano[_2_] Excel Programming 1 January 20th 04 10:15 PM
which FormField called a macro? Juggernath[_2_] Excel Programming 0 January 15th 04 12:58 PM


All times are GMT +1. The time now is 11:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"