Turn off "Printing.." message
There are API calls that can freeze your screen so nothing moves. But if
something goes wrong, it's reboot time. I wouldn't use them. I'd live with
minor flashing.
At the top of the module:
Declare Function LockWindowUpdate Lib _
"user32" (ByVal hwndLock As Long) As Long
Declare Function FindWindowA Lib _
"user32" (ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long
In your code:
Sub whatever()
'do stuff
'freeze the screen
hWnd = FindWindowA("XLMAIN", Application.Caption)
LockWindowUpdate hWnd
'do more stuff
'unfreeze the screen
LockWindowUpdate 0
'do more stuff
End sub
Remember to save your work often (in all open applications!) if you use this.
You may be rebooting more than you want. (I wouldn't use this--but I've said
this before.)
Al wrote:
I have a macro that prints a number of single sheets based on a user
generated list of workbooks. If the user has n workbooks listed, this
creates n print jobs, and consequently gets n messages saying €œNow printing
page 1€¦€ If n is large, this is kind of a nuisance. Is there a way to turn
off that message?
--
Al C
--
Dave Peterson
|