Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
HFB HFB is offline
external usenet poster
 
Posts: 17
Default Input box to update combo box

I have a combo box with several choices in it including "other". I would
like to make it so that when the "other" option is selected, an input box
appears. When the user types in the details and presses enter, I want the
stuff they've typed to show as the selection in the combo box.

If that can't be done, then I'd like the input box to update a text box
below the combo box with the inputted data.

How to?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 133
Default Input box to update combo box

do you know how to make a userform?

  #3   Report Post  
Posted to microsoft.public.excel.programming
HFB HFB is offline
external usenet poster
 
Posts: 17
Default Input box to update combo box

yes

"Chip" wrote:

do you know how to make a userform?


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Input box to update combo box

Private Sub Combobox1_Click()
if Combobox1.Value = "Other" then
res = Inputbox("enter special selection")
if res < "" then
combobox1.Value = res
End if
End if
End Sub

Make sure the style of the combobox is fmStyleDropDownCombo
This is the default, so if you haven't changed it you should be OK.

--
Regards,
Tom Ogilvy


"HFB" wrote in message
...
yes

"Chip" wrote:

do you know how to make a userform?




  #5   Report Post  
Posted to microsoft.public.excel.programming
HFB HFB is offline
external usenet poster
 
Posts: 17
Default Input box to update combo box

BEAUTIFUL! Thanks heaps Tom :)

"Tom Ogilvy" wrote:

Private Sub Combobox1_Click()
if Combobox1.Value = "Other" then
res = Inputbox("enter special selection")
if res < "" then
combobox1.Value = res
End if
End if
End Sub

Make sure the style of the combobox is fmStyleDropDownCombo
This is the default, so if you haven't changed it you should be OK.

--
Regards,
Tom Ogilvy


"HFB" wrote in message
...
yes

"Chip" wrote:

do you know how to make a userform?







  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Input box to update combo box

Does this solution add the new text to the drop down menu? so that next time
you use the combobox that value will be present?

"HFB" wrote:

BEAUTIFUL! Thanks heaps Tom :)

"Tom Ogilvy" wrote:

Private Sub Combobox1_Click()
if Combobox1.Value = "Other" then
res = Inputbox("enter special selection")
if res < "" then
combobox1.Value = res
End if
End if
End Sub

Make sure the style of the combobox is fmStyleDropDownCombo
This is the default, so if you haven't changed it you should be OK.

--
Regards,
Tom Ogilvy


"HFB" wrote in message
...
yes

"Chip" wrote:

do you know how to make a userform?





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
Combo box - input Range PCH Excel Discussion (Misc queries) 12 May 17th 07 01:09 AM
Combo Box input range automatic update John M Excel Discussion (Misc queries) 1 May 11th 06 08:05 PM
How can I calculate user input from a combo box into a formula? Quizboy Excel Worksheet Functions 0 November 16th 05 06:11 PM
Variable Input Range for Combo Box Defoes Right Boot Excel Worksheet Functions 2 July 20th 05 03:44 PM
Combo Box using Key Input Ron Perkins Excel Programming 1 February 25th 04 11:51 AM


All times are GMT +1. The time now is 05:03 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"