Data validation on print - need code

  • Thread starter Thread starter seeker
  • Start date Start date
S

seeker

I need a way to initiate data validation when the user tries to prin
the document.

E.g., cell R1C1 requires input. If user tries to print document
message box appears and tells them to fill in this cell first.

TI
 
seeker said:
I need a way to initiate data validation when the user tries to print
the document.

E.g., cell R1C1 requires input. If user tries to print document,
message box appears and tells them to fill in this cell first.

There is a Before Print event in the workbook.

Private Sub Workbook_BeforePrint(Cancel As Boolean)
If Range("A1")="" Then
Msgbox "You must fill A1 first"
Cancel = True
End If
End Sub

This code of course must be placed in the Workbook module.
Regards,
 
Back
Top