Unload/Hide UserForm without saving workbook

Mitchys

New Member
Joined
Oct 20, 2004
Messages
24
G'day,

My question is similar to LeoExcel's unanswered question Here, where the workbook is NOT to be saved when the UserForm is closed/hidden.

Here is my code:
Code:
Private Sub ReturnToSheet_Click()
    MsgBox "Before Hide"
    SaveForm.Hide
    MsgBox "After Hide"
End Sub
Now, the MsgBoxes are there only for me to see when the workbook is saving - which is after the "After Hide" MsgBox is closed. You see, my problem is exactly like LeoExcel, where I do NOT want the workbook to close (i.e. the UserForm is to get info from the user for the location to save the workbook. The user may want to make other changes before saving the workbook to the server).

(I'm using vba in Excel 2002)

Thank you,

Mitch
 

Some videos you may like

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

Mitchys

New Member
Joined
Oct 20, 2004
Messages
24
While I have fixed up my code posted elsewhere as a problem, this matter still evades me.

Is it possible to unload a userform without saving?

Thanks,

Mitch
 

Watch MrExcel Video

Forum statistics

Threads
1,118,081
Messages
5,570,088
Members
412,310
Latest member
mark884
Top