Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

ProgressBar While Waiting For Word Macro

Posted on 2002-05-15
3
Medium Priority
?
236 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
[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
  • 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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 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

618 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