When I use the PrintOut method to print the Worksheet object to the printer, the Print dialog box appears (with the file name, destination printer, printed pages, and the Cancel button), although I set DisplayAlerts = False. The code below works in the Excel macro, but the same thing happens if I use this code in a VB or VB.Net application (with the reference changes needed to use the Excel object).
Public Sub TestPrint()
Dim vSheet As Worksheet
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Set vSheet = ActiveSheet
vSheet.PrintOut Preview:=False
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub
EDIT: The answer below sheds light on this (it could be a Windows dialog box, not an Excel dialog box), but does not answer my question. Does anyone know how to prevent its display?
: , . , . , API-. - API , ?