Solved

ProgressBar While Waiting For Word Macro

Posted on 2002-05-15
3
229 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 50 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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

726 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