redraw thing

So my Excel app has VBA code that does a long file read and update
operation. This can take up to one hour. And the client wants it to
show a "please wait" message while it is doing this to help assure
that it isn't just hung.

So I added a non-modal user form with the message. Put it up on the
screen before the work starts, and unload it again after the work is
done.

My problem is, the form does not finish redrawing before the work
starts. And by then, Excel is sucking all the CPU doing the work, so
the form does not redraw. It shows an empty frame the entire time.
Which just makes it look more like things have hung rather than less.

So: What do folks do to show a "please wait" message during long
operations?
socks
0
puppet_sock (108)
3/19/2012 2:45:33 PM
excel 39879 articles. 2 followers. Follow

3 Replies
2023 Views

Similar Articles

[PageSpeed] 30

A single line:  DoEvents
....after the form is shown but before your "work" starts.

Also beneficial when trying to get messages boxes to go away.
-- 
Jim Cone
Portland, Oregon USA
http://www.mediafire.com/PrimitiveSoftware
(List Files XL add-in:  finds and lists files/folders with hyperlinks)





"Puppet_Sock" <puppet_sock@hotmail.com>
wrote in message
news:cb858315-2a65-4186-93ca-f654565a9b23@i2g2000vbv.googlegroups.com...
> So my Excel app has VBA code that does a long file read and update
> operation. This can take up to one hour. And the client wants it to
> show a "please wait" message while it is doing this to help assure
> that it isn't just hung.
>
> So I added a non-modal user form with the message. Put it up on the
> screen before the work starts, and unload it again after the work is
> done.
>
> My problem is, the form does not finish redrawing before the work
> starts. And by then, Excel is sucking all the CPU doing the work, so
> the form does not redraw. It shows an empty frame the entire time.
> Which just makes it look more like things have hung rather than less.
>
> So: What do folks do to show a "please wait" message during long
> operations?
> socks 


0
3/19/2012 3:15:57 PM
Puppet_Sock was thinking very hard :
> So my Excel app has VBA code that does a long file read and update
> operation. This can take up to one hour.

Geez, the file must be 10s of kigabytes in size OR you're doing it the 
slow way for whatever reason you may have against a more efficient 
approach!

-- 
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup!
    comp.lang.basic.visual.misc
    microsoft.public.vb.general.discussion


0
gs3102 (378)
3/19/2012 4:02:17 PM
On Mar 19, 11:15=A0am, "Jim Cone" <james.cone...@comcast.netXxx> wrote:
> A single line: =A0DoEvents
> ...after the form is shown but before your "work" starts.
>
> Also beneficial when trying to get messages boxes to go away.

Thanks Jim! That was exactly what I needed.
Socks
0
puppet_sock (108)
3/23/2012 6:22:28 PM
Reply:

Similar Artilces:

Help! I thing I have a bad script!
Several times, I have seen "sending x of x message(s)" and the number increases. I usually only send 1 message at a time. A few weeks back, I saw this happen, and then I started to get TONS of undeliverable messages errors. And now that account gets filtered by spam filters by some of my friends. I am now seeing that I am sending more messages than I send, and am getting some bounce back messages. Running Vista, Outlook 2007, Mcafee, spyboy and adaware. (just return flags on cookies and MRUs) I have installed Cloudmard, Spambayes and Active Agent. Only 3 macros are installed, ...

Grrr....Is this an Access 2007 thing?
I have no problem opening up a 2nd pop-up form that is linked to another form IF the record from the main form ISN'T new. However when it is new it NEVER will save the linked record in the 2nd form. This is what I mean. On the main form if you enter a new record, in this case a "Person", then click on a command button, it will open up a second linked form (it filters the 2nd form by it's "PersonID" ). Of course in this instance the 2nd form will open completely blank since there are not yet any related records. This 2nd form has the following code in it's "...

how can i combane picture with other things ?
I WANT TO COMBANE PICTURES,I WANT TO PUT MY PHOTO AND THEN OTHER PICTURE THAT WILL MAKE AS I'M IN THE WATER WHILE I NOT. This is not something that you can do with Microsoft Word. You need a decent photo editor - such as Photoshop or one of the cheaper 'clones'. -- <>>< ><<> ><<> <>>< ><<> <>>< <>><<> Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org <>>< ><<> ><<> <>>< ><<> &...

Mortgage Loan with Redraw Facility
What is the best way to set up a Mortgage with a Variable Interest Rate Calculated Daily (Charged Monthly) The Mortgage has a redraw facility. My min payment is $160 / Mth. If I pay $100 / Week I have an amount of $240 I can redraw & spend. But interest is calculated on what money I have saved in Total. ie $240 in Mortgage account plus $5000 savings account So if my Mortgage was $100,000. Interest would be calculated on $94,760 I think you would be best off setting this up either as a credit card or as a liability. The standard "loan" account type would be difficult to ma...

Weirdest thing I ever saw
OK................when I open a certain (only one) excel file excel is opening three separate identical files to the one I open. Excel will normally not open more than one file with identical names. What it is doing is naming them as follows filename.xls:1 , filename.xls:2, and filename.xls:3. I have never seen a : after the xls extension. Any of you experts know whats up? Steve Hubbard These are actually just separate windows into the same excel workbook. Select one of the windows you don't want and hit ctrl-w to close it. Repeat until you're down to just one window and save ...

Can Excel do things like Quicken
I would like to take me check book and enter in all information so I can get a good idea of where my money is going. But I would like to have Excel sort them into groups like eating out, Bills...Etc with a total so I can put them into graphs. Can Excel to this? I know quicken can but I don't want to use quicken Thanks You can use a pivot table to summarize the entries by category. There are instructions in Excel's Help, and Jon Peltier has information and links: http://peltiertech.com/Excel/Pivots/pivotstart.htm Justin wrote: > I would like to take me check book and e...

Finding thing errors quickly in a huge column
OK guys. I have a column with 20,000 dates in. They should all be in the format that is DD/MM/YYYY, but some times people have only put days and months and occasionally random characters are in there too. Is there a formula to search for cells in column A that are not DD/MM/YYYY? I have tried using autofilter and stuff but that is not very quick. Many thanks gang! ...

Unknown things in Exchange 2003
Hi I"m getting all kind of Information events in my Exchange server. Are they OK? Event Type: Information Event Source: MSExchangeIS Mailbox Store Event Category: (6) Event ID: 9535 Date: 09/11/2006 Time: 01:15:19 User: N/A Computer: SERVER Description: The description for Event ID ( 9535 ) in Source ( MSExchangeIS Mailbox Store ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for det...

redraw thing
So my Excel app has VBA code that does a long file read and update operation. This can take up to one hour. And the client wants it to show a "please wait" message while it is doing this to help assure that it isn't just hung. So I added a non-modal user form with the message. Put it up on the screen before the work starts, and unload it again after the work is done. My problem is, the form does not finish redrawing before the work starts. And by then, Excel is sucking all the CPU doing the work, so the form does not redraw. It shows an empty frame the entire time. Which just m...

configure english for outlook, tried the tools option thing
Trying to configure from french to english In spell check, tried the tools option thing, the only option Is french,,,help Phil;113178 Wrote: > Trying to configure from french to english In spell check, tried the > tools > option thing, > the only option Is french,,,help What version of Outlook? What does Help>Aboiut say? I suspect you're not using Outlook at all, but Outlook Express, since this is a well-known issue for OE. -- Brian Tillman [MVP-Outlook] http://forums.slipstick.com ...

Pine and Outlook: Outlook messes up message ordering ... among other things ...
Hi All, I have my pine and outlook clients pointing to the same exchange server via IMAP. Everything is running relatively smoothly. I can see all my messages arrive in both clients simultaneously. However my issue is that if I open and close an old email in outlook - it shows up as the latest email in my pine email inbox. I have pine setup to sort messages on their arrival time - and it's looks like outlook actually takes an email off the server and re-adds it or something - so pine thinks the message just arrived. The same symptoms are seen after my outlook rules are run. The orderin...

relay if off, but im still seeing wierd things in the queue...take a look
Relay is off, but im still seeing weird things in the queue...take a look 9198.sweetbutterdeals.com 3541.wantsomemarketmagic.com 7152.goodtimedeals.com There is about 100 of these in the smtp queue with mostly marketing in the name. This is freaking me out since I did have a relay open at one point in my early exchange career. Regards, Matt Have you tested (double checked) the open relay by using telnet? http://support.microsoft.com/default.aspx?scid=kb;en-us... 1. Click Start, click Run, type telnet, and then click OK. 2. At the Telnet command prompt, type set local_echo, and th...

How do i backup every thing in outlook
Hi, How do i backup everything in outlook from account seettings to the address book. Cheers Try looking here for your answer: http://www.slipstick.com/config/backup.htm -- Nikki Peterson [MVP - Outlook] "joe" <anonymous@discussions.microsoft.com> wrote in message news:fe8001c43eba$f14f9420$a601280a@phx.gbl... Hi, How do i backup everything in outlook from account seettings to the address book. Cheers The default Outlook file will have all of your items in it. The file name will end in .pst To find it search your computer for *.pst files but you must be able to view/se...

Adding up pie slaces of the same thing?
Here is what I am trying to do: Kroger $29.90 Ebay $20.00 Kroger $10.00 Best Buy $40.00 Kroger $51.00 Gas $35.00 Gas $50.00 Create a pie chart of this data where Kroger, Best Buy, etc only appear once in the pie chart. Currently the default is to create a pie slice for each entry, where I would like it to add up the Kroger values and present it as one pie slice. I want it to do this for any similar entries. Is there an easy way to do this? Thanks! I would do a pivot table summing the quantity for each then graph the results. Rita Khensu ...

Strange thing
Something strange happend... Outlook 2003 + Windows XP - there were problems with mail server (IMAP) after it I can see all messages in message list, however I *CANNOT SEE THEM IN VIEW WINDOW* - What's the mess??? Everything looks ok, I tried from other computer it works, but from my nothing! I tried to rerun outlook, restart the computer - NOTHING Helps... Someone see that? - PLEASE HELP -- Regards, Tamir Khason Especially those days you need a flexible IT service provider that can meet your needs through a broad set of offerings. TCON - A technology company that understands your busi...

you see big things and more ************************************************
you see big things and more ************************************************ ************************************************ http://anushkahollywood.blogspot.com/ ************************************************* you see big things and more ************************************************ ************************************************ http://anushkahollywood.blogspot.com/ ************************************************* ...

Is this thing on?
The quick brown fox... ...

NEWSGROUP "SPAM"
NEWSGROUP "SPAM" - No Such Thing. Newsgroups are public. What is "SPAM"? Unsolicited messages? Then everyone that post to a newsgroup is "spamming" unless they are responding to a direct question. What is Off Topic? Anything that isn't relevant to the group description? Then 99% of newsgroup posters are spammers. You've never posted an off topic comment? You can't lie. It's archived in Google. Links to websites are spam? Then what are those links in your signature? OH....it's ok to "SPAM" a little bit. As a matter of fact its ok to...

can't force redraw of my frame
Hi! I want to show a blinking text over my derived CMDIChildWnd-class. The blinking is done by one view which is hold by my frame. I set up a timer and write text to the parent frame, which works fine. But I can't get the text away the next time the timer fires. Here is some code: void MyView::OnTimer(UINT nIDEvent) { if (nIDEvent!=1) return; showText = !showText; // Call base class handler. CView::OnTimer(nIDEvent); CUserFrame* frame = (CUserFrame*)(this->GetParentFrame()); CRect clientRect; frame->GetClientRect(&clientRect); if (showText){ ...

strange autoselect thing
I had just finished deleting a bunch of messages in outlook xp. Then something strange happend. I selected an e-mail, and next thing you know my selection kept floating to the top. ie. I selected say, the 5th message down, next thing you know, the blue selection highlight would start moving up to the very top of the list. Then when I opened the start menu, i could highlight something in my frequent programs list but then the highlight would rapidly move back and forth from my mouse hover point to set program access defaults. This happend in any folder, sent, deleted, inbox etc. Closing outlo...

CScrollview not redrawing properly
I have a CScrollView onto which I drew some text using the DrawText call. But it isn't working like it should. If I resize the window so that the last lines of text aren't showing, then scroll down, they don't show up. I scroll back up, and the top lines are there. Then, if I resize the window back to large, I can see the bottom lines again. This must have something to do with the drawing, but I'm not quite sure how exactly the drawing is handled when scrolling with the CScrollView object. Please help! In OnDraw() for the ScrollView, I have: CRect clientRect; GetClientR...

how to redraw the bitmap in a dialog box
hello, Can someone tell how to do this since i have been struggling with it for more than 2 weeks. My application draws a series of bitmaps on the dialog box one after the other. Its something like an animation where i read the bitmaps from a file and draw each one subsequently in a specified region of the dialog box using "dc.bitblt" in a while loop in the OnPaint message handler.Everyhtin is working fine but the problem arises when i move this dialog box outside the client area of the application and then move it back in or minimise the application and maximise it again. Then the O...

One thing I REALLY HATE about Outlook and Office.....
I really hate the fact that I open an email, open the attachment (word or Publisher) , then spend 4 hours editing a document someone sent me. I press save, and close the document. I open Word or Publisher again to work on the file, and It is not in the recent documents list. Then I remember that it was an attachment in an email - Open that attachment again, but what I get is the un-edited version. The version that I worked on for 4 hours is GONE! This happens in Outlook, as well as Live mail. Really sucks to be me right now. Any way to get these documents back? /cl "ChinaLamb&...

Help! Excel freeze the whole thing when start.
Excel problem in my office has been constantly bugging me. Now that one of the computer can even start Excel, when we try to start it, it gives something like "resource is not enough" message and then just dies there. We can even fix it by removing it and reinstall it. Any one has idea deal with this? Many thanks in advance. Pete Try cleaning up your windows temp folder. And if that didn't help, try searching for your *.xlb file. It's where excel stores your customized toolbars. Windows Start button|Find|files check out the size of that file. If it's huge, try r...

Need help with the simplest thing with the check box
I'm trying to do the simplest thing (and have wanted to for years) wit a check box - stick it -in- a cell just so I can check or uncheck it Of course, it will be even better if I can get the rest of th worksheet to read a 1/0 or true/false from this box; but I'm usin office 2000 and it says nothing useful. I pull the box out of the for toolbar, but it's a floating object like a chart. And that's all th reference I can find in Officer 2000. Thanks in advance for any help you can give -- Zubbu ----------------------------------------------------------------------- Zubbus's...