Hi all,
I have the following formula that isn't right.
I'm trying to change the message when you save the file, I need it to ask whether the data has been uploaded, if its a "yes" it will save and close, if its a "no" the it closes the message and opens the worksheet "data input"
This is what I have so far:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
If MsgBox("Have you uploaded the data?", vbYesNo) = vbYes Then Exit Sub
If MsgBox("upload now?", vbYesNo) = vbYes Then
This is where I'm stuck as I can't for the life of me remember what comes next...
Also, is there a way of stopping the workbook from being closed if there is no change made to the data input tab?
Thanks for you help in advance.
I have the following formula that isn't right.
I'm trying to change the message when you save the file, I need it to ask whether the data has been uploaded, if its a "yes" it will save and close, if its a "no" the it closes the message and opens the worksheet "data input"
This is what I have so far:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
If MsgBox("Have you uploaded the data?", vbYesNo) = vbYes Then Exit Sub
If MsgBox("upload now?", vbYesNo) = vbYes Then
This is where I'm stuck as I can't for the life of me remember what comes next...
Also, is there a way of stopping the workbook from being closed if there is no change made to the data input tab?
Thanks for you help in advance.