I
inbound03
I have a UserForm with 5 check boxes; 5 Frames, each with optYes, optNo,
and optNA; one Frame with a combo box and an Enter button, the layout
of the UserForm is as follows:
Chk09 optYes optNo optN/A
Chk10
Chk11 optYes optNo optN/A
Chk12 optYes optNo optN/A
Chk13 optYes optNo optN/A
Combo box
Enter button
I make all check boxes invisible except chk09 when the UserForm is
initialized. When user checks chk09, the corresponding frame with
optYes, optNo, and optN/A appears. If user selects optNo, the combo box
and the Enter button appear. When user clicks the Enter button, chk11
appears. This procedure repeats every time the user chooses optNo and
then hits the Enter button.
My problem is that chk12 appears instead of chk11 when I hit the Enter
button after I answer question 9. Can anyone tell me what did I do
wrong?
The following is the code I wrote for the “Enter” button:
'Hide the combo box and the OK button after transferring respective
concern to "Recap"
Private Sub cmdGroundsEnter_Click()
cmdGroundsEnter.Default = True
Call chkUnhide
'Hide the frame
FrameConcernGrounds.Visible = False
'Check for completeness
If cmbConcernGrounds.Text = "" Then
MsgBox "Please select the security concern"
FrameConcernGrounds.Visible = True
Exit Sub
End If
' Find next available row
NextRow = Sheets("Recap").Range("a5000").End(xlUp).Row + 1
' Transfer the data
Sheets("Recap").Cells(NextRow, 1) = Qnum
Sheets("Recap").Cells(NextRow, 2) = Cat
Sheets("Recap").Cells(NextRow, 4) = cmbConcernGrounds.Text & Chr(15)
Sheets("Recap").Cells(NextRow, 7) = Action
' Reset the Userform for the next row
cmbConcernGrounds = ""
End Sub
Here is the call procedure I wrote:
Here is the call procedure I wrote:
Public Sub chkUnhide()
Select Case CheckBox
Case chk09.Value = True
chk11.Visible = True
Case chk11.Value = True
chk12.Visible = True
Case chk12.Value = True
chk13.Visible = True
End Select
End sub
Thanks a bunch.
Alex
and optNA; one Frame with a combo box and an Enter button, the layout
of the UserForm is as follows:
Chk09 optYes optNo optN/A
Chk10
Chk11 optYes optNo optN/A
Chk12 optYes optNo optN/A
Chk13 optYes optNo optN/A
Combo box
Enter button
I make all check boxes invisible except chk09 when the UserForm is
initialized. When user checks chk09, the corresponding frame with
optYes, optNo, and optN/A appears. If user selects optNo, the combo box
and the Enter button appear. When user clicks the Enter button, chk11
appears. This procedure repeats every time the user chooses optNo and
then hits the Enter button.
My problem is that chk12 appears instead of chk11 when I hit the Enter
button after I answer question 9. Can anyone tell me what did I do
wrong?
The following is the code I wrote for the “Enter” button:
'Hide the combo box and the OK button after transferring respective
concern to "Recap"
Private Sub cmdGroundsEnter_Click()
cmdGroundsEnter.Default = True
Call chkUnhide
'Hide the frame
FrameConcernGrounds.Visible = False
'Check for completeness
If cmbConcernGrounds.Text = "" Then
MsgBox "Please select the security concern"
FrameConcernGrounds.Visible = True
Exit Sub
End If
' Find next available row
NextRow = Sheets("Recap").Range("a5000").End(xlUp).Row + 1
' Transfer the data
Sheets("Recap").Cells(NextRow, 1) = Qnum
Sheets("Recap").Cells(NextRow, 2) = Cat
Sheets("Recap").Cells(NextRow, 4) = cmbConcernGrounds.Text & Chr(15)
Sheets("Recap").Cells(NextRow, 7) = Action
' Reset the Userform for the next row
cmbConcernGrounds = ""
End Sub
Here is the call procedure I wrote:
Here is the call procedure I wrote:
Public Sub chkUnhide()
Select Case CheckBox
Case chk09.Value = True
chk11.Visible = True
Case chk11.Value = True
chk12.Visible = True
Case chk12.Value = True
chk13.Visible = True
End Select
End sub
Thanks a bunch.
Alex