VBA - 10 second message

  • Thread starter Programmer - wannaB
  • Start date
P

Programmer - wannaB

MSGBOX requires a prompt, but how can I display a message that displays for a
set number of seconds and then clears it's self, with out pauseing the
procedure that call the display.

The Process that I have rrunning takes nearly a minute and I would like to
display a brief message at different stages to keep users entertained, so
they don't expect that it failed...
 
D

Douglas J. Steele

Write your own form. Set its TImerInterval property appropriately (10000
will give you 10 seconds), then put code to close the form in the form's
Timer event.
 
P

Programmer - wannaB

AWSOME !!! I totally Understood that and knew where you were going with it
before I finished reading the first line.. Don't get me wrong, I don't think
I'm smart,
Yet!!
Thank you so much...
=========================
 
T

Tony Toews [MVP]

AWSOME !!! I totally Understood that and knew where you were going with it
before I finished reading the first line.. Don't get me wrong, I don't think
I'm smart,

But I'm not sure I'd use a timer. If you have different events then
display that on the form. That is "Stage 1 of 7", Stage 2 of 7" and
so forth. With a message box at the end. Note that you will need to
do a repaint on the form.

Everyone's computer might be faster or slower than yours given a
number of variables such as CPU, RAM, network connection speed,
network card and/or driver efficiency and what else the user might be
doing on their system at the time.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
W

WANNABE

Thanks Tony,
I have 3 simple notes that will display for 7 seconds each, and will
simply state what process completed, and what process has started
the app is on a slow network, and each process will take longer
then 7 seconds.
=================================
AWSOME !!! I totally Understood that and knew where you were going with it
before I finished reading the first line.. Don't get me wrong, I don't think
I'm smart,

But I'm not sure I'd use a timer. If you have different events then
display that on the form. That is "Stage 1 of 7", Stage 2 of 7" and
so forth. With a message box at the end. Note that you will need to
do a repaint on the form.

Everyone's computer might be faster or slower than yours given a
number of variables such as CPU, RAM, network connection speed,
network card and/or driver efficiency and what else the user might be
doing on their system at the time.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
T

Tony Toews [MVP]

WANNABE said:
I have 3 simple notes that will display for 7 seconds each, and will
simply state what process completed, and what process has started
the app is on a slow network, and each process will take longer
then 7 seconds.

You can certainly do what you want. However I'd just leave the note
up for the entire duration of that process and change it once the next
one was started. In my opinion that would make more sense from the
users viewpoint.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
W

WANNABE

Thanks a lot Tony, that's a great idea. I will attempt that the next time I
make a code change.
My first thought is open form and start of procedure and close form in the
exit area, is there a name for the area
Exit_Area:

=============================
WANNABE said:
I have 3 simple notes that will display for 7 seconds each, and will
simply state what process completed, and what process has started
the app is on a slow network, and each process will take longer
then 7 seconds.

You can certainly do what you want. However I'd just leave the note
up for the entire duration of that process and change it once the next
one was started. In my opinion that would make more sense from the
users viewpoint.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
T

Tony Toews [MVP]

WANNABE said:
Thanks a lot Tony, that's a great idea. I will attempt that the next time I
make a code change.
My first thought is open form and start of procedure and close form in the
exit area, is there a name for the area
Exit_Area:

At the end of the procedure do a docmd.close of the form. Don't
forget the Repaint when you update the message.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top