Solved

Sleep

Posted on 2006-11-25
3
326 Views
Last Modified: 2010-04-30
I have an app that I am checking another file on a server, I am doing a ton of things in between, and on the server end, but my app doesnt take into effect the server ends processing time (can take upto 2-5 seconds) so I put a Sleep function in....

The progress bar works fine, but the text does not it just shows the last message only.

Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Updater.currentmessage = "Establishing Connection"
ProgressBar.Value = 10
Sleep (2000)
Updater.currentmessage = "Connection Established"
ProgressBar.Value = 20
Sleep (2000)
Updater.currentmessage = "Checking Versions"
ProgressBar.Value = 30
0
Comment
Question by:B_Dorsey
  • 2
3 Comments
 
LVL 29

Accepted Solution

by:
Nightman earned 75 total points
ID: 18012060
Try this (by placing the DoEvents statement before each sleep statement)

Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Updater.currentmessage = "Establishing Connection"
ProgressBar.Value = 10
DoEvents
Sleep (2000)
Updater.currentmessage = "Connection Established"
ProgressBar.Value = 20
DoEvents
Sleep (2000)
Updater.currentmessage = "Checking Versions"
ProgressBar.Value = 30
DoEvents
0
 
LVL 14

Author Comment

by:B_Dorsey
ID: 18012067
OMGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG!

To think I stayed up all night for that...... Im a LOSER! ...lol

VERY BIG THANKS

b
0
 
LVL 29

Expert Comment

by:Nightman
ID: 18012074
Don't knock yourself - usually a second pair of eyes makes a world of difference.

I wasted 3 hours the other day debugging and getting frustrated, only to finally figure out I was connected to the wrong database;)
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA error replacing data 6 40
using web browser with BING 40 132
Powerpoint 2013: Change cell reference in excel link 3 84
VBA: Insert New column with specific format type 12 39
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…

820 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