Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hourglass Mouse Pointer changes to normal when Excel object is created

Status
Not open for further replies.

jimbo08

Programmer
May 4, 2001
12
US
I have an Access form that takes user input, and then calls a procedure in a VB module. The procedure creates an instance of Excel, and then writes a considerable amount of data to it, taking several minutes. I change the mouse pointer to Hourglass just before I call the procedure, but the point changes back to normal (on its own) about the time the Excel object is created. I don't make the Excel Workbook visible until all of the data is inserted, so the user sees no activity for several minutes. This leaves the user(s) with the impression that the application is hosed.

Any suggestions on how I can keep the hourglass on until the report finishes?
 
In the module, use this

[COLOR=blue white]DoCmd.Hourglass True[/color]

to turn on the hourglass. When you want to change the cursor back to normal, use

[COLOR=blue white]DoCmd.Hourglass False[/color]

[tt]_____
[blue]-John[/blue]
[/tt][red]Quidquid latine dictum sit, altum viditur[/red]

Help us help you. Please read FAQ181-2886 before posting.
 
Thanks for your suggestion. It would seem to me that this would work, but it doesn't. However, (by accident) I found that if I call a message box early in my procedure, the hourglass returns. This must have something to do with making the calling form the active window again -- such things are beyond me. It would be nice to know more, but my hourglass is working, so I will leave it at that. Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top