Prev: Automatically entering a number of tables when prompted.
Next: Template- when saved as a new document remove macros
From: Lloyd Catlett on 23 Apr 2010 13:23 I've a sub that takes as much as 2 minutes to complete all work and return control to user. I can easily calculate the % progress and want to display it (with updates) to let the user know something is really happening. I created a textbox that I make visible and can change the textbox.value as the % complete changes. The only way I can get the textbox.value to update is to do a userform.RePaint, but the flickering of the userform is distracting. Any suggestions for another way? -- L. Catlett
From: Jay Freedman on 23 Apr 2010 17:22 I haven't used it in a long time, but http://www.word.mvps.org/FAQs/Userforms/CreateAProgressBar.htm suggests using a label in a frame on the userform, and repainting just the frame. Worth a try, anyway. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. Lloyd Catlett wrote: > I've a sub that takes as much as 2 minutes to complete all work and > return control to user. I can easily calculate the % progress and > want to display it (with updates) to let the user know something is > really happening. > > I created a textbox that I make visible and can change the > textbox.value as the % complete changes. The only way I can get the > textbox.value to update is to do a userform.RePaint, but the > flickering of the userform is distracting. > > Any suggestions for another way?
From: Paul Shapiro on 23 Apr 2010 18:17 The system status bar can display a progress meter. Look at details for SysCmd. A rough sample would be: 'Initialize SysCmd acSysCmdInitMeter, "Status line text...", longIntegerValueWhichIs100Percent 'Within your task report status SysCmd acSysCmdUpdateMeter, longIntegerValueCompleted 'Cleanup when finished SysCmd acSysCmdRemoveMeter Many years ago I found that calls to display progress could take more time than the task itself. If the counter I'm using to estimate status is a very large number, I include a line to only update the status meter if the percent complete changes by at least 1%. It could be no longer necessary, but worth checking that the task doesn't take significantly longer when you report status. "Lloyd Catlett" <LloydCatlett(a)discussions.microsoft.com> wrote in message news:BA850013-4C7B-4059-9D68-BA3C0FE05BD9(a)microsoft.com... > I've a sub that takes as much as 2 minutes to complete all work and return > control to user. I can easily calculate the % progress and want to > display > it (with updates) to let the user know something is really happening. > > I created a textbox that I make visible and can change the textbox.value > as > the % complete changes. The only way I can get the textbox.value to > update > is to do a userform.RePaint, but the flickering of the userform is > distracting. > > Any suggestions for another way?
From: Michael Bednarek on 24 Apr 2010 02:43 On Fri, 23 Apr 2010 10:23:02 -0700, Lloyd Catlett wrote in microsoft.public.word.vba.general: >I've a sub that takes as much as 2 minutes to complete all work and return >control to user. I can easily calculate the % progress and want to display >it (with updates) to let the user know something is really happening. > >I created a textbox that I make visible and can change the textbox.value as >the % complete changes. The only way I can get the textbox.value to update >is to do a userform.RePaint, but the flickering of the userform is >distracting. > >Any suggestions for another way? Have you tried the "Microsoft ProgressBar Control 6.0" from "Microsoft Windows Common Controls 6.0" (mscomctl.ocx)? I've used that a number of times. Some instructions at http://www.la-solutions.co.uk/content/MVBA/MVBA-ProgressBar.htm . -- Michael Bednarek http://mbednarek.com/ "POST NO BILLS"
From: Lloyd Catlett on 24 Apr 2010 21:08
Michael, I just took a look at the link you suggested. It looks like it will provide exactly what I want. I'll try it out in the next day or two and let you and the others know the results. If I could bake some cookies for you, I'd do it, but a "Thank you" will hopefully be enough. -- L. Catlett "Michael Bednarek" wrote: > On Fri, 23 Apr 2010 10:23:02 -0700, Lloyd Catlett wrote in > microsoft.public.word.vba.general: > > >I've a sub that takes as much as 2 minutes to complete all work and return > >control to user. I can easily calculate the % progress and want to display > >it (with updates) to let the user know something is really happening. > > > >I created a textbox that I make visible and can change the textbox.value as > >the % complete changes. The only way I can get the textbox.value to update > >is to do a userform.RePaint, but the flickering of the userform is > >distracting. > > > >Any suggestions for another way? > > Have you tried the "Microsoft ProgressBar Control 6.0" from "Microsoft > Windows Common Controls 6.0" (mscomctl.ocx)? I've used that a number of > times. Some instructions at > http://www.la-solutions.co.uk/content/MVBA/MVBA-ProgressBar.htm . > > -- > Michael Bednarek http://mbednarek.com/ "POST NO BILLS" > . > |