ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Deactivating Printing Message (https://www.excelbanter.com/excel-programming/306628-deactivating-printing-message.html)

TONYC[_10_]

Deactivating Printing Message
 
When printing a document via a macro can the printing message whic
appears on screen be turned off.

I am using the following command

ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True

Ton

--
Message posted from http://www.ExcelForum.com


No Name

Deactivating Printing Message
 
here is a sniplet that i saved. i haven't used it yet but
you can try it.
sniplet to turn of alerts such as save a file before close.
Application.DisplayAlerts = False
Worksheets("Report").Delete
Application.DisplayAlerts = True

-----Original Message-----
When printing a document via a macro can the printing

message which
appears on screen be turned off.

I am using the following command

ActiveWindow.SelectedSheets.PrintOut Copies:=1,

Collate:=True

Tony


---
Message posted from http://www.ExcelForum.com/

.


TONYC[_11_]

Deactivating Printing Message
 
I tried as you suggested but unfortunately the print message stil
appeared on the screen.

Any other suggestions?

Ton

--
Message posted from http://www.ExcelForum.com


SNooGs[_3_]

Deactivating Printing Message
 
Try turning off the screen updating. Really helps speed things up for
me when running alot of code that writes to a sheet etc. as well.

Application.screenupdating = false
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Application.screenupdating = true

Hope this helps.


---
Message posted from http://www.ExcelForum.com/


TONYC[_12_]

Deactivating Printing Message
 
I have tried this as well, but it still keeps appearing.

Ton

--
Message posted from http://www.ExcelForum.com


Dave Peterson[_3_]

Deactivating Printing Message
 
You can turn off all of the windows screen updates--but it this code stops,
you'll be rebooting your pc:

Option Explicit
Private Declare Function LockWindowUpdate Lib "USER32" _
(ByVal hwndLock As Long) As Long
Private Declare Function GetDesktopWindow Lib "USER32" () As Long
Sub WindowUpdating(Enabled As Boolean)

'Completely Locks the Whole Application Screen Area,
'including dialogs and the mouse.

Dim Res As Long

If Enabled Then
LockWindowUpdate 0
'Unlock screen area
Else
Res = LockWindowUpdate(GetDesktopWindow)
'Lock at desktop level
End If

End Sub

Sub testme01()
Call WindowUpdating(False)
Worksheets("Sheet1").PrintOut
Call WindowUpdating(True)
End Sub



"TONYC <" wrote:

When printing a document via a macro can the printing message which
appears on screen be turned off.

I am using the following command

ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True

Tony

---
Message posted from http://www.ExcelForum.com/


--

Dave Peterson


TONYC[_14_]

Deactivating Printing Message
 
Is there a simplier way of stopping print message appearing?

Ton

--
Message posted from http://www.ExcelForum.com


Dave Peterson[_3_]

Deactivating Printing Message
 
Not that I know of.

Well, sometimes I go for coffee and never see it <bg.

"TONYC <" wrote:

Is there a simplier way of stopping print message appearing?

Tony

---
Message posted from http://www.ExcelForum.com/


--

Dave Peterson



All times are GMT +1. The time now is 01:33 PM.

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