Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Need help with check box coding, urgent!!!

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


---
Message posted from http://www.ExcelForum.com/

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
IME MODE FOR EXCEL 2007 (URGENT URGENT) Stella Wong Excel Discussion (Misc queries) 1 August 23rd 08 11:16 PM
Urgent-Urgent VBA LOOP Jeff Excel Discussion (Misc queries) 0 October 6th 05 05:46 PM
Macro help urgent urgent Dave Peterson[_3_] Excel Programming 0 September 4th 03 03:59 PM
Macro help urgent urgent chandra Excel Programming 0 September 4th 03 03:50 PM
Coding to check for a sheet name and add it if it's not there AlanN Excel Programming 2 August 21st 03 09:17 PM


All times are GMT +1. The time now is 11:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"