Thread
:
Add items to a combo box and make them available after closing the sheet
View Single Post
#
2
Posted to microsoft.public.excel.misc
Dave Peterson
external usenet poster
Posts: 35,218
Add items to a combo box and make them available after closing thesheet
Maybe you can store the values on a hidden worksheet and then populate from
there???
wrote:
Alright, I have a user form that I have been building and it has the
following code within..
Private Sub UserForm_Initialize()
cboName.Value = ""
cboTestNumber.Value = ""
txtScore.Value = ""
With cboTestNumber
.AddItem "Sec+"
.AddItem "270"
.AddItem "290"
.AddItem "291"
.AddItem "293"
.AddItem "294"
.AddItem "298"
.AddItem "299"
End With
cboName.SetFocus
End Sub
Works great.. At least as far as the cboTestNumber since they are
defined with .AddItem. In another sub I have the following lines
that obviously takes the value from the form and adds it to the combo
box.
With cboName
.AddItem cboName.Value
End With
This also works like a treat and dynamically adds values to the 'Name'
combo box as they are entered so they do not have to be re-typed
later.. BUT if I save the sheet, close out and open again (or reset
the Macro) obviously the value in cboName.Value goes away and my combo
box is once again empty...
What I would like to happen is once a name is entered in the first
time, that the name be added to the 'Name' combo box list and be
available when pulling up the sheet the next day.
Is this possible?
Thanks in advance...
David
--
Dave Peterson
Reply With Quote
Dave Peterson
View Public Profile
Find all posts by Dave Peterson