Deactivating Printing Message

  • Thread starter Thread starter TONYC
  • Start date Start date
T

TONYC

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
 
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
 
I tried as you suggested but unfortunately the print message stil
appeared on the screen.

Any other suggestions?

Ton
 
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.
 
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
 
Not that I know of.

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

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

Similar Threads


Back
Top