Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
HI Keith
That's cool -- Pranav Vaidya VBA Developer PN, MH-India If you think my answer is useful, please rate this post as an ANSWER!! "Keith74" wrote: Ah, found a solution, adding a line to the query close event works Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) Dim varResponse As Variant If CloseMode = vbFormControlMenu Then If blnChangedData = True Then varResponse = MsgBox("You have changed data without saving" & Chr(13) & Chr(13) & _ "Do you wish to exit the form now?", vbYesNo) If varResponse = vbNo Then Exit Sub End If End If Unload Me set frmClient = nothing '<------new line frmMain.Show End If End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Colon at the end of excel file name(ex: problem.xls:1, problem.xls | New Users to Excel | |||
Userform Queryclose and Unload problem | Excel Programming | |||
Started out as an Access problem. Now an Excel problem | Excel Discussion (Misc queries) | |||
Problem when multipple users access shared xl-file at the same time, macrocode for solve this problem? | Excel Programming |