how do i suppress the outputting and printing dialog boxes that pop up while running vba code such as:
or
i tried a suggestion to use this code i found on another website:
but the dialog box still popped up with a blank face. on top of that, it made my vba editor behave very oddly even after i turned the suppression back off.
if someone could please tell me how i could do this, that would be really great. and if someone also knows where i can learn/find code related to window messages in office and in windows like this i would be very appreciative. thank you!
--nate
Code:
DoCmd.OpenReport "Report1"
Code:
DoCmd.OutputTo acOutputReport, "Report1", acFormatPDF, Filename, False
Code:
Option Compare Database
Option Explicit
Private Declare Function GetDesktopWindow Lib "user32" () As Long
Private Declare Function LockWindowUpdate Lib "user32" (ByVal hwndLock As Long) As Long
Sub DisablePrintDialog(DisableIt as boolean)
on error goto Err_Trap
if DisableIt then
LockWindowUpdate (GetDesktopWindow)
else
LockWIndowUpdate (False)
end if
exit sub
Err_Trap
msgbox err.number & ": " & err.description
Resume Next
end sub
if someone could please tell me how i could do this, that would be really great. and if someone also knows where i can learn/find code related to window messages in office and in windows like this i would be very appreciative. thank you!
--nate
Comment