Is there a way to keep intermediate results from being displayed while PowerPoint macro runs?

D

david.f.jenkins

Subject pretty much says it all. Don't seem to be able to find any way
to keep the intermediate stuff from being displayed.

Also: how can I change the mouse pointer to an hourglass while the
macro is running?

Thanks...
 
C

Chirag

You can freeze the PowerPoint window to prevent it from showing the updates
using the LockWindowUpdate(). You can freeze the entire desktop from showing
the updates by using that API with GetDesktopWindow() API as follows:

---
Private Declare Function GetDesktopWindow Lib "user32" () As Long
Private Declare Function LockWindowUpdate Lib "user32" ( _
ByVal hwndLock As Long) As Long

Sub DoSomeJob()
On Error Resume Next

LockWindowsUpdate GetDesktopWindow()

'
' Do the tasks here.
'

LockWindowsUpdate 0
End Sub
---

The entire desktop would be frozen while the VBA code runs. The
LockWindowsUpdate with parameter 0 would unfreeze it.

- Chirag

PowerShow - View multiple PowerPoint slide shows simultaneously
http://officeone.mvps.org/powershow/powershow.html
 
D

david.f.jenkins

Thanks. I seem to have got duplicate topics started here. Tried to
delete one, but there it still is. Go figure.

Anyway, I did as you suggested, and it works great - thanks! It also
seems to have speeded things up somehwat, but that's a highly
subjective observation.

What about my second question: is there a way to turn the mousepinter
into the spinning hourglass while the macro is running?
 
D

david.f.jenkins

Using F2 in the VBA IDE, I get no hits searching "all libraries" for
"cursor", "Mouse", "mousepointer" or anything else I can think of that
pertains to my question. Any tips on what I'm doing wrong?
 
H

Howard Kaikow

Then there's a problem with your installation.
I get 11 items listed for "cursor"
 
H

Helmut Weber

Hi David,
Using F2 in the VBA IDE, I get no hits searching "all libraries" for
"cursor", "Mouse", "mousepointer" or anything else I can think of that
pertains to my question. Any tips on what I'm doing wrong?

Sorry.

Try (on a pretty fast machine):

Dim i As Long
System.Cursor = wdCursorWait
For i = 1 To 100000000
Next

Greetings from Bavaria, Germany

Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word XP, Win 98
http://word.mvps.org/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top