LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Getting input from combobox to update sheet

In a userform I'm have a Combobox (CB) that holds names. When the routine is
first run list for the CB is empty. The user then inputs a name and this is
to be stored for subsequent uses of the workbook. Any other time the form is
opened, the ListIndex = 0 will show the user's name for confirmation.

The following is another option that I'm contemplating but I need to get the
single entry done first: "If another user needs to, they can input their
name and it is then added to the top of the list, so that the next time the
form is opened this new entry will be the default name shown on the form and
the previous entries would show in the dropdown as secondary names."

It is my understanding that manual input into a combobox can be stored back
to a sheet, preferably the list for the combobox.

Can't seem to find a way to start this that works. I tried using CB_Exit to
allow for input but it doesn't copy the input back to the named range on the
sheet. Also, I don't seem to getting the new entry into the value property
after it's typed in.

--------------------------------------------------
' CBName is the combobox and Cardholder is the named range

Private Sub CBName_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Dim CHName As String
CHName = Sheets("Carddata").Range("Cardholder").Cells(1, 1).Value
If CHName = "" Then
CHName = Me.CBName.Value
End If
End Sub
----------------------------------------------------
 
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
Input from ComboBox Bill_Green Excel Programming 1 August 3rd 08 02:24 PM
Need to update a ComboBox when selecting a sheet [email protected] Excel Worksheet Functions 1 October 31st 07 02:23 PM
Combobox options based on the input of another combobox afmullane[_5_] Excel Programming 1 May 3rd 06 01:44 PM
ComboBox input Geoff[_12_] Excel Programming 6 July 20th 05 06:59 PM
Compare input from ComboBox stevem[_4_] Excel Programming 0 April 1st 04 07:42 PM


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