Someone please Help!

  • Thread starter Thread starter inbound03
  • Start date Start date
I

inbound03

Hi everyone:

I have a question about coding and need someone's hlep.

I have a UserForm with 7 sets (#17, 18, 19, 20, 22, 24, & 25) of
¡§Yes¡¨, ¡§No¡¨, ¡§N/A¡¨ Option Buttons and a Text Box with an
¡§Enter¡¨ Button for users to answer 3 (#21, 23, & 26) questions. How
can I code the "Enter¡¨ button that each of the typed answers get
transferred to G159, G163, and B170 respectively?

The Text Box appears for question #21 when user clicks ¡§YES¡¨ on #20;
the box appears again for #23 when user clicks either ¡§YES¡¨ or ¡§NO¡¨
on #22. The Text Box appears once again for #26 when user clicks
either ¡§YES¡¨ or ¡§NO¡¨ on #25.

I coded the following and for some reason, the text for #23 sent to
G159 instead of G163. Also, the Option Buttons for #24 didn¡¦t appear.
Please help.

Private Sub cmdEnterQ2_Click()


'Hide the frame
Frame212326.Visible = False

'Check for completeness
If txtQ2.Text = "" Then
MsgBox "Please enter information!"
Frame212326.Visible = True
Exit Sub
End If

' Procedure for #21:
If optYes20.Value = True Then
Sheets("Report").Range("G159") = txtQ2.Text
Frame22.Visible = True
txtQ2 = ""
Exit Sub
End If


' Procedure for #23:
If optYes22.Value = True Or optNo22.Value = True Then
Sheets("Report").Range("G163") = txtQ2.Text
Frame24.Visible = True
txtQ2 = ""
Exit Sub
End If

' Procedure for #26:
If optYes25.Value = True Or optNo25.Value = True Then
Sheets("Report").Range("B170") = txtQ2.Text
Call cmdExitVisible
txtQ2 = ""
Exit Sub
End If

End Sub



Thanks in advance.

Alex
 
Alex,

Might take some time to setup a test. Why don't you mail me a workbook and I
will take a look,

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
bob . phillips @ tiscali . co . uk

remove the spaces

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Back
Top