?
Solved

ProgressBar While Waiting For Word Macro

Posted on 2002-05-15
3
Medium Priority
?
241 Views
Last Modified: 2008-03-10
I'm using VB6 against an SQL Server database.
I have a form which has several selections and a command button which the user launches a word macro based on these selections.
The word macro will launch an instance of Microsoft Word and generate a report based on the user selections.
Sometimes if the report is large, it takes a while for Word to popup.
I added a "Processing...Please Wait...." to the Caption to inform the user.
I'd like to add a ProgressBar to let them know that word is busy in the background.
I don't have a recordset to loop thru so I can't show them the progressbar processing on the from so is there another way to do this; possibly with a timer.

Also, if anyone knows of other ways to inform the user of a wait state, I'd appreciate it.

Thanks in Advance
John
0
Comment
Question by:jtrapat1
  • 2
3 Comments
 
LVL 4

Accepted Solution

by:
trkcorp earned 200 total points
ID: 7011403
Just a suggestion... you might opt for a status bar and simply change the text as you go through the motions.  For example:
"Initializing Microsoft Word.  One moment please..."
"Opening Word document."
"Processing Macro.  One moment please..."
"Macro completed.  Closing Word.  One moment please..."
"Process completed successfully!"

This kind of approach works pretty well.  A progress bar could be used too by counting the steps involved, setting the .Max property = to the count and then incrementing the value as each step completes.
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 7011548
because Word does not trigger events when running a macro, you cannot have a progress bar (you don't know for how long the macro will run and how much time for ending).
0
 
LVL 4

Expert Comment

by:trkcorp
ID: 7011579
emoreau is right and so all you can do is report to the best of your knowledge what is taking place according to your code's execution... anything else would just be some "made up stuff".
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses
Course of the Month16 days, 12 hours left to enroll

862 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