tony.reynolds
Board Regular
- Joined
- Jul 8, 2010
- Messages
- 97
i need to add a code to the workbook at the end of a macro then when the user runs the next macro it removes it
this is so the workbook cannot be closed and half finish the order number system i have.
i have a cancell button that reverses actions done by the first macro and this will have to remove it as well
how do i insert/reove this code from a workbook with a macro?
can someone help?
this is so the workbook cannot be closed and half finish the order number system i have.
i have a cancell button that reverses actions done by the first macro and this will have to remove it as well
how do i insert/reove this code from a workbook with a macro?
Code:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
MsgBox "Please finish Order or chose cancel!"
Cancel = True
End Sub
can someone help?