Hi just wondering if any one can help i have a beforeprint to check the form has been completed correctly before printing and a Msg box that askes if it has printed out ok.
the question i have is can i stop the msgbox showing unless the form is completed as i have a yes and no option if you click yes it saves the file to PDF and clears the form and being this pops up after showing the error before print there is a risk of someone pressing yes and resetting the form.
the question i have is can i stop the msgbox showing unless the form is completed as i have a yes and no option if you click yes it saves the file to PDF and clears the form and being this pops up after showing the error before print there is a risk of someone pressing yes and resetting the form.
VBA Code:
Sub PrintScreen()
ActiveSheet.PageSetup.CenterFooter = Format(Now, "DD MMMM YYYY - HH:MM")
ActiveSheet.PrintOut
Dim AnswerYes As String
Dim AnswerNo As String
AnswerYes = MsgBox("Has the document printed out ok? - if No fix the problem and try again.", vbQuestion + vbYesNo, "Document Printing")
If Answer = vbNo Then MsgBox "Please rectify the problem and print again", vbInformation, "Not Printed Out"
If AnswerYes = vbYes Then Call Clearform
End Sub