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
1869 Views

Similar Articles

[PageSpeed] 14

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:

signature (email address does funky things!)
When I insert a signature in a reply or fwd, It adds <email> beside my email address. Can someone help. HTML format Thanks. ...

CListView derived class and redraw problems...
To all, I have CListView derived class and when the user tries to resize the columns, there are lines drawn on the screen very much like bar codes. I have looked around and it looks like it is a well known problem but I can not understand how to fix it. I read there is a need to change the HDN_BEGINTRACK and HDN_ENDTRACK to ON_NOTIFY. When I do that and I set breakpoints in both, I only hit the breakpoint for BEGINTRACK and never for ENDTRACK. Anyone knows how to solve this? The real problem being the need to redraw the control when the column resizing has ended. Regards, Reza "rez...

help with a few simple things
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Hi! I am stuck with a few simple tasks. For one, how can I edit data. I cursor does not show up, to remove a space for example. If I try to take out this space the whole number is erased. In other versions of excel that I have used there is a box at the top to make modifications, but this is not seen in the version I am using. I am stumped how to make simple numerical modifications without re-typing the whole number. <br><br>Also, when I am trying to do calculations using =C4+C5, for example, I type this in and ...

XP things in win 7
Where do I stop the sleep mode in win 7? How do you save on-line pictures as the wallpaper? I used to be able to right click and save as Desktop in XP. Or is there a site to explains how to do all the stuff we used to be able to do in XP in windows 7. Remember I can't Copy & Paste with my mouse, just with hot keys. Thanks Jack Right click on a picture, select "set as background" to turn it into your wallpaper. -- Charlie. http://msmvps.com/blogs/russel "Jack" <Fl.Gulfer@Gmail.com> wrote in message news:OEnCVOE%23KHA.148...

Resizing bitmap without losing quality (or a method to redraw the bitmap)
I have a 2d real time oscilloscope (a bitmap created with CDC CreateCompatibleDc and so on...). I need to resize to a bigger image and back to original size when the user click one of two button (like a zoom). I have tried with StretchBlt, but the image is very poor in quality. I can create a new bitmap of the desired size for perfect quality, but in this way a lose the graph that is displayed on first bitmap. Is it possible to resize the bitmap wihout losing too much or do something that allow me not to lose the 2d graph drawed on it? roby.schwarz@libero.it wrote: > I have a 2d real tim...

Top 10 Things To Look For In A Web Host #3
Top 10 Things To Look For In A Web Host http://hosting-top10.blogspot.com/2008/07/top-10-things-to-look-for-in-web-= host.html 5 Tips To Choose A Domain Name For An Internet Business http://hosting-top10.blogspot.com/2008/07/5-tips-to-choose-domain-name-for.= html Domain Name Registration - Investments That Reap Benefits (part 2) http://hosting-top10.blogspot.com/2008/07/domain-name-registration-investme= nts_28.html Domain Name Registration - Investments That Reap Benefits (part 1) http://hosting-top10.blogspot.com/2008/07/domain-name-registration-investme= nts.html Getting One Free Domains...

OWA using mix of machine name/FQDN, screwing things up with HTTPS
Hello, We have one particular customer whose SBS 2003 box is giving me some heartburn when it comes to setting up OWA. I've set it up for HTTPS only, and setup permissions the exact same as our other many working OWA systems. Here's what happens when I try and hit the "broken" one: When I go to: https://server.domain.com/exchange, I get prompted for a username and password, which works properly. After login, I get a warning that the page contains a mix of both secure and non secure items. If I don't display the non secure items, I see the two "panes"...

How do I get rid of that large "PAGE 1" thing in Excel?
I'm trying to delete the large "PAGE 1" background text in an Excel spreadsheet. I used the F1 key, and it was useless. You are in page break view, look under view and select normal -- Regards, Peo Sjoblom "shreddaddy" <shreddaddy@discussions.microsoft.com> wrote in message news:856FA9CE-BB49-43CB-BDAC-6C92D30BFEEB@microsoft.com... > I'm trying to delete the large "PAGE 1" background text in an Excel > spreadsheet. > I used the F1 key, and it was useless. Thank you very much. It worked! Nobody else in my office could help me. I...

Home network puzzle -- things have fallen apart.
I have three computers which until recently shared all their disks via a wired/wireless home network. Recently the networks has gotten into a mess and I haven't found out how to get it working again. The situation: Computer A has read/write access to the disks on computers B and C Computer B has read/write access to the disks on computer A, but throws an error "\\C is not accessible. You might not have permission to use this network resource. etc." Computer C can't even access the network, throwing an error "Network is not accessible. etc."...

Exchange is making me break things on my desk.
Ok, I am completely lost on this one and it's driving me freaking CRAZY!!!! I have exchange installed on SBS2003 and can't switch this company from Yahoo! bizmail to exchange until I can get SMTP relaying to work for their 3 external employees who use POP3. Don't even mention RPC over HTTPS to me on this one. You want to sync 1.6GB of outlook data over a 512k connection? Let alone be on the phone that long explaining how to set it up to the user? So here's where I am. I cannot authenticate with the SMTP server from outside the network. I logged the SMTPSVC and it...

Strange thing when copying a range !!
This is a multi-part message in MIME format. ------=_NextPart_000_0056_01CA7D09.53379650 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable The following code gives me the error " 1004 ..." in the second line Sheets ("MASTER").Select Range("Fall_from_height").Select 'PS : the range exists !! Copy The following code works, but after the Copy instruction it creates an = new workbook !!!!! (i do not want that it creates a new workbook). Sheets ("MASTER").Select Application.G...

VB
I have a new computer at home and have moved (copied) a lot of my Excel stuff from my work computer to my new computer. Things run relatively smoothly, but there are a couple of things I don't understand. 1) If I open VB from a spreadsheet - View, Toolbars, Visual Basic, VB Editor - and open a module, the screen is blank - the module shows nothing in it. If I go to Tools, Macros, and select a particular Macro, it pulls up the module and shows the code. 2) I am using the following to re-size the VB code windows: Dim cmpComponent As VBIDE.VBComponent Dim cmpComponents As ...

M2004 matching transactions to things months old.
I recently 'upgraded' from money 2000 to 2004. I had to export all my accounts in .qif format and import them in 2004. AFter dealing with a few duplicated transactions i thought i had things running smoothly. All i do is download my statements and manually mark them all reconciled. In money 2000, it would only ever ask me if a downloaded transaction matched one in the register if i had entered it manually. That was fine. However i'm finding with Money 2004, it's trying to match downloaded transactions against other reconsiled transactions that happened month or more ago....

Purchased the wrong thing
I know that this may sound trivial, but I purchased the upgrade version of Microcoft Office 2004 instead of the Full version. Apparently i need an earlier version of office to run the newer version because it is an upgrade. My question is where can i find a cheap older version so that i can finally use my newer officer 2004 for mac? i've asked the local stores and nobody carries it. Please help. Stacy O. On 3/18/07 11:39 PM, in article 1174286350.555260.67050@o5g2000hsb.googlegroups.com, "bonnylass757@googlemail.com" <bonnylass757@googlemail.com> wrote: > I know that ...

The $ thing to lock cells at rows or columns
Hi group, I do know how manually modify the content of a cell so that when "pulling it" to autocomplete into further rows and columns one can lock either row or column. Like =$I$10 It is rather cumbersome though getting the $ sign where it must be. Once I knew a combination of keys that fixed that for me, but I have forgotten. And if one is optimistic enough to enter the $ sign in the help search function one is in for a reminder of who made this software. So I have to ask you guys and girls. Is there still a clever way to have the =$I$10, or has that been discarded with the ba...

Redraw problem in ownerdraw listbox
Hi, I have a array of ownerdrawn listbox. when its gets displayed, it displayed perfectly. But, when I click on any of the listbox, the borders are disappeared. Also, when I minimize the application and maximize it again, it displays perfectly with the borders. FYI, I have derived a class from CListBox. Please help me to identify the problem. Karthic Generally, this is caused by drawing on the border area. When you are called in OnDrawItem, you are given in the DRAWITEMSTRUCT a rectangle, I think it is called rcItem. You must NOT draw outside that rectangle. In particular, if you do G...

Strange thing with protection
I have a very strange problem that I can't figure out In one sheet of a multi sheet workbook, it appears to be impossible t edit values in non-protected cells while the sheet is protected. When I click on any cell in the sheet, no value at all appears in th formula bar and the cursor does not appear in the cell itself. An attempt to edit a value just overwrites everything in the cell rathe than appending to the end. All the other sheets in the wokbook behave normally whether they ar protected or not. I have checked and compared all the "options" between the sheets an they all a...

Changing the Same thing on multiple charts
I have 36 line charts of data from the same 4 pilot groups and 2 comparison groups. After I got them all created, I had a request to increase the weight of the lines for readability on all of the charts. Is there a way to easily do this? Right now all I envision is clicking on all 216 lines! My guess is a macro which I know nothing about. On the same note, is there a way to have it change the colors all at once (for instance, take the yellow lines, make them red)? -- mea You can follow this procedure to make your task somewhat less tedious: Select an item on one chart (a series,...

Can you exclude things from the word count?
Hi, I'm writing an essay in which the tutor would like us to not include the references (Author and Date) within the word count. Is there a way that I can exclude any words within the brackets from the word count as they all have different names etc? Thanks Leane Not without considerable tedium, though it might be possible to create a macro to do this? Using Ctrl-Clicking and dragging, select all but the references (when text is selected, word displays the count of selected text: if not directly in the status bar, then when you click on the count number there); or, forma...

$5.00 is a good thing
<HTML> <HEAD> <META NAME="GENERATOR" Content="Microsoft DHTML Editing Control"> <TITLE></TITLE> </HEAD> <BODY> <P>&nbsp;</P> </BODY> </HTML> ...

Thing won't allow me to requery
Hi I have a form Purchase Orders with a subform Purchase Order Items. When I add prices into the Purchase Order items subform, I want the main form to requery to display the new totals. I use this: Forms.[Purchase Order Form]![Order Details].Requery I get run-time error '438'. Object doesn't support this property or method. What is wrong with the thing? Stapes "Stapes" <steve.staple@gmail.com> wrote in message news:4b24c7b3-1775-4865-80ae-077d9473c033@v4g2000hsf.googlegroups.com... > Hi > I have a form Purchase Orders with a subform Purchase Order Items...

litte thing in graphs
It should be easy but i cant find ??? i have graphs which is designed to process the info for daily til takings and on the X axis i want to make the first column name "budget" then the others be 1,2,3...... for the days how can i do that?????????? -- Message posted from http://www.ExcelForum.com "hilary >" <<hilary.1art6z@excelforum-nospam.com> wrote in message news:hilary.1art6z@excelforum-nospam.com... > It should be easy but i cant find ??? > > i have graphs which is designed to process the info for daily till > takings and on the X ax...

Font thing
Good afternoon, everybody. A stupid question about font. How to make a font looking like this: S o m e t e x t. I mean to make a space between characters longer, but characters should be the same size like normal. Thanks. Use Courier (raster) or Courier New (true type). -- ============ Frank Hickman Microsoft MVP NobleSoft, Inc. ============ Replace the _nosp@m_ with @ to reply. "German Koninin" <germanD0Tkoninin/_\TcolumbuscrmD0|com> wrote in message news:OT3GGMv$EHA.4072@TK2MSFTNGP10.phx.gbl... > Good afternoon, everybody. > A stupid question about font. How t...

few confusing things about Full-Text Search queries
hi I=92ve started learning FULL-TEXT Search queries ( using Sql server 2008 ) and I did try to find the answers to my questions by running various queries and see how they behave, but then not even the simplest of queries returned the results I=92ve expected, so=85 1) From Msdn: =93<simple_term> - Specifies a match for an exact word or a phrase. Examples of valid simple terms are "blue berry", blueberry, and "Microsoft SQL Server". Phrases should be enclosed in double quotation marks (""). Words in a phrase must appear in the same order ...

Help with a procedure to make things easier
With Excel 2007 I have data (both text and numbers) in column A. Some of the "text" is underlined. I would like to place an “x” in column B next to the data in column A that is underlined. See below. I would like to place the “x” in column B in the easiest manner possible, automatically without placing the "x" manually for each item since I have a few thousand rows. Also, I would like to do this without using a macro. Since I am unable to underline in this post, the following data in column A is underlined. Also, you can see an "x" in column B c...