Hi, There is a form that opens when i open the workbook and workbook is hidden (only shows Userform not the workbook when opens)
This userform i created has A TEXT BOX and two buttons CONTINUE and CANCEL.
If i hit CONTINUE, something should happen and then open the workbook
If i hit CANCEL, then it should close the workbook.
CANCEL button working fine only for the first time, if i try to open the workbook again, directly its showing workbook without userform.
If i close and open the workbook again, then its working fine (only userform, and workbook ishidden).
So every second time, the workbook opening without showing userform if the previous time i hit CANCEL
This userform i created has A TEXT BOX and two buttons CONTINUE and CANCEL.
If i hit CONTINUE, something should happen and then open the workbook
If i hit CANCEL, then it should close the workbook.
CANCEL button working fine only for the first time, if i try to open the workbook again, directly its showing workbook without userform.
If i close and open the workbook again, then its working fine (only userform, and workbook ishidden).
So every second time, the workbook opening without showing userform if the previous time i hit CANCEL
VBA Code:
VBA Code:
Private Sub CONTINUE_Click()
ThisWorkbook.Sheets("MAIN").[B1].Value = Select_System.Value
ThisWorkbook.Sheets("MAIN").[B2].Value = Select_Frame.Value
ThisWorkbook.Sheets("MAIN").[B3].Value = Select_Grate.Value
If ThisWorkbook.Sheets("MAIN").[B1].Value = "" Then
RESULT = MsgBox("INVALID INPUT", vbRetryCancel + vbCritical)
If RESULT = vbCancel Then
Unload FloThru
Application.Quit
ThisWorkbook.Save = False
End If
Else
Application.Visible = True
Unload FloThru
End If
End Sub
Private Sub CANCEL_Click()
Unload FloThru
End Sub