?
Solved

Temp Message Box

Posted on 2003-02-19
6
Medium Priority
?
202 Views
Last Modified: 2010-04-07
Hello,

I'm using VB Script and need to launch a message box for a couple of seconds and then close. Basically when a button is pressed this message will appear stating something like "Please Wait Launching Program" and then disappear.

Thanks
Clinton
0
Comment
Question by:Clinton112299
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 

Expert Comment

by:Sonofyoda
ID: 7981859
There is a 'wait' API call, but I don't think this works in scripting ...

Declare Sub Sleep Lib "kernel32" Alias "Sleep" (ByVal dwMilliseconds As Long)



Where sleep(1000) will wait 1 second
0
 
LVL 1

Expert Comment

by:dwphilippe
ID: 7982007
I don't know how VB Script works but in VB6 I solve the problem like this:
Instate to show a msgbox you can show a form. When the form is showed you start a timer and when the timer is finished you close the form again.

I don't know if this helps you
0
 
LVL 1

Expert Comment

by:tgraffham
ID: 7983134
Are you using VB Script from Access or ASP or what?

If this is an Access database, no problem.  Create a form that looks like your message box with no buttons just the test.  Give that form an OnTimer event that says simply "DoCmd.Close acForm, Me.Name" and then set the Timer Interval higher and higher until you're happy with how long it stays up.  Start with about 5000 or so or you won't hardly see the form at all.

Hope this helps,
Tim
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Clinton112299
ID: 7989256
Hello,

THis is the first time using the VB editor and things are very limited on what I can do. So far I can't figure out how to close the Msgbox once I open it. Also applies to Forms, it's always waiting for someone to press the X button. ANy ideals on what to do?

This is what I have so far;

MsgBox ("Please Wait..........")
IntCount = 1
Do While IntCount <= 10
IntCount = IntCount + 1
Loop

THe problem with this is that the Msgbox is open and will NOT drop down for the rest of the code unitl I press and close it.

What I pain in the *@*#^*@#

Clinton
0
 
LVL 1

Accepted Solution

by:
dwphilippe earned 150 total points
ID: 7994518
Clinton,

What you say is true. When you call a msgbox the program will stop until an user action.
That's the reason why I say to work with a form.

You make a form2 with your message and a timer1.
In form1 you add the code:
  form2.show 1
In the timer1 of form2:
  unload me

Now when you ask to show form2, the form will show and the timer start to count down. When he is on zero he unload hisselve and go farther with the code after form2.show 1.

Good luck
0
 

Author Comment

by:Clinton112299
ID: 7994903
Thanks,

I ended up using a form.

Clinton
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses
Course of the Month8 days, 2 hours left to enroll

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question