Sue,
I figured it out. I set a flag to the variable FileNameFormat on the
userform and then use Select Case FileNameFormat back in the module to set
the filename.
Chris
"Sue Mosher [MVP]" wrote:
Sorry, but I really can't see the problem here, because I don't know what the
user interaction might be in your scenario. Maybe you should step away from
the keyboard and sketch out a flow chart that includes those interaction
points. In other words, how does "the new data" you described in your
original post get injected into the process? Once you can visualize that, I
suspect you'll see the solution, too -- or at least be able to communicate
more information to us.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
"Chris" wrote:
Sue,
They are declared as Global Variables. The problem is that the order I use
them in to create the file name, can change. I can get the name correct once
but I need to know how to refresh the data every time the FileNameFormat
variable is called after initializing it.
Example:
Some users may want:
strSend & "_" & strSubj & "_" strTime
Other users may want:
strSend & "_" strTime & "_" & strSubj
and yet others may want:
strSend & "_" & strSubj
I need a way to accommodate all possibilities of the order of the variables.
"Sue Mosher [MVP]" wrote:
Why not just declare the variables strTime, strSend, and strSubj as global
variables?
"Chris" wrote:
I need help with ordering an set of variables (strSend,strSubj,StrTime) and
keeping them in that order. I use a userform to allow the user to select one
of the ten formats and assign the order to the variable FileNameFormat
(FileNameFormat = strTime & "_" & strSend & "_" & strSubj). The problem is
that the FileNameFormat takes the values of the variables once and will not
update with the new data as the loop is run (NewFileName = FileNameFormat &
".msg"). Is there a way to store the order of variables in another variable
to be able to assign the values of those stored variables as they change?