ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Turn off "Printing.." message (https://www.excelbanter.com/excel-programming/412311-turn-off-printing-message.html)

al

Turn off "Printing.." message
 
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

Jim Thomlinson

Turn off "Printing.." message
 
There is no way to turn off that message that I am aware of.
--
HTH...

Jim Thomlinson


"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

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

Jim Thomlinson

Turn off "Printing.." message
 
Have you ever used it. I read about it... considered it for a moment... and
then promptly chickened out.
--
HTH...

Jim Thomlinson


"Dave Peterson" wrote:

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



All times are GMT +1. The time now is 08:00 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com