MWE
02-22-2006, 06:28 PM
I am running Word2000.
I have a pretty simple userform. It has 5 checkboxes and 3 buttons. It communicates with the main application via a global boolean array of size [0 to 5]. The code to load and show the form from the main appl is ufrmRqmtMgmt_RemoveOptions.Show
The startup and shutdown code in the form's code module is Option Explicit
Private Sub UserForm_Activate()
RqmtIDRmvOpCode(0) = False
RqmtIDRmvOpCode(1) = False
RqmtIDRmvOpCode(2) = False
RqmtIDRmvOpCode(3) = False
RqmtIDRmvOpCode(4) = False
RqmtIDRmvOpCode(5) = False
Me.ckbxIDText = True
Me.ckbxMarkers = False
Me.ckbxBkMk = True
Me.ckbxTOR = True
Me.ckbxTOTBD = True
End Sub
Private Sub cmdbtnHelp_Click()
MsgBox "no help available yet"
End Sub
Private Sub cmdbtnCancel_Click()
RqmtIDRmvOpCode(0) = False
RqmtIDRmvOpCode(1) = False
RqmtIDRmvOpCode(2) = False
RqmtIDRmvOpCode(3) = False
RqmtIDRmvOpCode(4) = False
RqmtIDRmvOpCode(5) = False
Unload Me
End Sub
Private Sub cmdbtnOK_Click()
RqmtIDRmvOpCode(0) = True
RqmtIDRmvOpCode(1) = Me.ckbxIDText.Value
RqmtIDRmvOpCode(2) = Me.ckbxMarkers.Value
RqmtIDRmvOpCode(3) = Me.ckbxBkMk.Value
RqmtIDRmvOpCode(4) = Me.ckbxTOR.Value
RqmtIDRmvOpCode(5) = Me.ckbxTOTBD.Value
Unload Me
End Sub
The form loads and shows the way it should. The check boxes work as they should. The Help button and Cancel buttons do what they should, and the OK button passes correct information back to the main application. But when I click OK, the form does not close and unload. It stays around on the screen the next MsgBox display. :banghead:
Other forms in the same appl open and close fine.
Any ideas what might be wrong here?
I have a pretty simple userform. It has 5 checkboxes and 3 buttons. It communicates with the main application via a global boolean array of size [0 to 5]. The code to load and show the form from the main appl is ufrmRqmtMgmt_RemoveOptions.Show
The startup and shutdown code in the form's code module is Option Explicit
Private Sub UserForm_Activate()
RqmtIDRmvOpCode(0) = False
RqmtIDRmvOpCode(1) = False
RqmtIDRmvOpCode(2) = False
RqmtIDRmvOpCode(3) = False
RqmtIDRmvOpCode(4) = False
RqmtIDRmvOpCode(5) = False
Me.ckbxIDText = True
Me.ckbxMarkers = False
Me.ckbxBkMk = True
Me.ckbxTOR = True
Me.ckbxTOTBD = True
End Sub
Private Sub cmdbtnHelp_Click()
MsgBox "no help available yet"
End Sub
Private Sub cmdbtnCancel_Click()
RqmtIDRmvOpCode(0) = False
RqmtIDRmvOpCode(1) = False
RqmtIDRmvOpCode(2) = False
RqmtIDRmvOpCode(3) = False
RqmtIDRmvOpCode(4) = False
RqmtIDRmvOpCode(5) = False
Unload Me
End Sub
Private Sub cmdbtnOK_Click()
RqmtIDRmvOpCode(0) = True
RqmtIDRmvOpCode(1) = Me.ckbxIDText.Value
RqmtIDRmvOpCode(2) = Me.ckbxMarkers.Value
RqmtIDRmvOpCode(3) = Me.ckbxBkMk.Value
RqmtIDRmvOpCode(4) = Me.ckbxTOR.Value
RqmtIDRmvOpCode(5) = Me.ckbxTOTBD.Value
Unload Me
End Sub
The form loads and shows the way it should. The check boxes work as they should. The Help button and Cancel buttons do what they should, and the OK button passes correct information back to the main application. But when I click OK, the form does not close and unload. It stays around on the screen the next MsgBox display. :banghead:
Other forms in the same appl open and close fine.
Any ideas what might be wrong here?