Smurfit-Stone
Active Member
- Joined
- Dec 1, 2004
- Messages
- 485
Hello Board,
I have a macro that doesn't allow the user to print or save with entering a delivery date. the macro is place in "This Workbook" module. My problem is I want the macro to run according to one worksheet in particular, not the whole workbook, can anyone tell me where I can place or how I can redo this procedure. Macro below...Thanks in advance.
Private Sub Workbook_BeforePrint(Cancel As Boolean)
If Sheet1.Range("$L$4") = "" Then
Do While Not IsDate(Range("L$4"))
MsgBox "Delivery date required"
Sheet1.Range("$L$4") = InputBox("Please Enter Delivery Date")
Loop
End If
Me.Save
End Sub
I have a macro that doesn't allow the user to print or save with entering a delivery date. the macro is place in "This Workbook" module. My problem is I want the macro to run according to one worksheet in particular, not the whole workbook, can anyone tell me where I can place or how I can redo this procedure. Macro below...Thanks in advance.
Private Sub Workbook_BeforePrint(Cancel As Boolean)
If Sheet1.Range("$L$4") = "" Then
Do While Not IsDate(Range("L$4"))
MsgBox "Delivery date required"
Sheet1.Range("$L$4") = InputBox("Please Enter Delivery Date")
Loop
End If
Me.Save
End Sub