Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 109
Default User form question

I have a form, on it there are several Yes/No combo boxes.

If the user chooses No then I want another form to open with a comments box.
When this form is closed I would like the original form to be displayed and
the text entered into the comments box placed on a worksheet.

What would be the code for the combo box and the OK button on the second
form?

Thanks in advance.

Gareth


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 550
Default User form question

Gareth,

' Assuming the second UserForm is named UserForm2.....
Private Sub ComboBox1_Change()
UserForm2.Show
End Sub

' Assuming UserForm2 has a TextBox where you'll enter comments and
a CommandButton

Private Sub CommandButton1_Click()
Worksheets("yoursheetname").Range("A1").Value =TextBox1.Value
End Sub

If the text that's entered onto the worksheet needs to populate a textbox
or a label on UserForm1, then try
Private Sub CommandButton1_Click()
Worksheets("yoursheetname").Range("A1").Value =TextBox1.Value
Unload UserForm2
Unload UserForm1
UserForm1.Show
End Sub

John


Gareth wrote:

I have a form, on it there are several Yes/No combo boxes.

If the user chooses No then I want another form to open with a comments box.
When this form is closed I would like the original form to be displayed and
the text entered into the comments box placed on a worksheet.

What would be the code for the combo box and the OK button on the second
form?

Thanks in advance.

Gareth


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
User Form question ah Excel Discussion (Misc queries) 1 November 5th 07 10:40 AM
How do I fill a cell in a user form from a selection on same form? Terry Tipsy Excel Discussion (Misc queries) 4 June 11th 07 02:59 PM
user form question: text box to display result BigPig Excel Discussion (Misc queries) 0 February 28th 06 12:33 AM
user form question: text box to display result BigPig Excel Worksheet Functions 0 February 25th 06 08:17 PM
I am looking to see if anybody has an equivalant user form to Outlooks CONTACT form BruceJ[_2_] Excel Programming 2 October 15th 03 05:28 PM


All times are GMT +1. The time now is 06:44 PM.

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

About Us

"It's about Microsoft Excel"