View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Shatin Shatin is offline
external usenet poster
 
Posts: 54
Default One Single Message Box for chained macros

Oops, you are right. I mean Input Box.

"John Wilson" wrote in message
...
Shatin,

Is it a message box?? I kinda doubt it because you can't
input data to a message box.
Is it an InputBox or a UserForm??

Without seeing the code, it's difficult to answer your question.

What you could do is set a public variable in a regular module
and populate it with the date from any of your ??boxes.
Then you could check for that date.
For an InputBox, just use an IF statement before it.

If IsDate(MyDate) = false Then
' show my input box
End If

Or if it's a text box on a UserForm......
In the Activate Event.

If IsDate(MyDate) Then
TextBox1 = MyDate
End If

John

"Shatin" wrote in message
...
I have several macros which are all to do with file generations. They

all
begin with a message box asking for a date. The resulting filenames

depend
on the date entered, e.g. "macro1 02/02/04", "macro2 02/02/04". I have
written a master macro chaining these macros together. The hassle is

when
the master macro is run, I'd be prompted by the various message boxes

which
belong to the individual macros. Is there anyway I can put some code in

the
master macro so that when the message boxes come up, they'd all get the

same
date? Obviously I don't want to change the individual macros because

they
are still needed as standalone macros from time to time.

TIA.