View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
kirkm[_6_] kirkm[_6_] is offline
external usenet poster
 
Posts: 156
Default Adding a Value List to Combo Box

On Wed, 21 Feb 2007 05:59:55 -0800, Tom Ogilvy
wrote:

No, you can't use this approach in Excel - is that clearer.


Yes, yes!! Something I stumbled over said I could.... and I
foolishly believed it!

This is what you can do:

Private Sub Userform_Initialize()
Listbox1.Rowsource = ""
Me.Listbox1.AddItem "Info1"
Me.Listbox1.AddItem "Info2"
Me.Listbox1.AddItem "Info3"
End sub

In excel, you can type in a comma separated list when using the the list
option under Data =Validation (method #2). This is a form of combobox.

This suggestion was a possible alternative to whatever you are trying to
achieve which does not use the type of combobox you are trying to use.
disregard it an place all your energy in using AddItem.



Many thanks Tom, it all makes sense now. I succeeded with the AddItem
method, but then discovered a Hidden Form was possible and this
provided a storage means as well.

Cheers - Kirk