Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 156
Default Adding a Value List to Combo Box

I thought this would be easy!

My instructions are

Set the Row source Type property to Value List

0n the Data tab of the property sheet,
click .... to open the Edit List Items
dialog box, and then type the items on
separate lnes.

However I have no such Selection available in RowSource.

Another instruction says


The combo and list box controls allow you to enter a list of items.
When you choose this route, you enter in the control's Row Source
property a setting in the form of

"item1";"item2";"item3"

But if I enter that into RowSource, Excel tells me

Could not set the RowSource property. Invalid property value.

Very frustrating! Anyone know why this isn't working?

Thanks - Kirk
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Adding a Value List to Combo Box

where are you getting these instructions. Are they for Excel. I don't use
Access, but it seems It is possible in Access (although I believe the
correct way is a combination of the two ways you describe) - anyway to the
best of my knowledge it isn't possible in Excel for a listbox/combobox from
the control toolbox toolbar.

In excel, you can use additem to add items to a listbox or combobox at
runtime or assign the rowsource/listfillrange property to a range either
using the properties window or at runtime.

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.



--
Regards,
Tom Ogilvy

"kirkm" wrote in message
...
I thought this would be easy!

My instructions are

Set the Row source Type property to Value List

0n the Data tab of the property sheet,
click .... to open the Edit List Items
dialog box, and then type the items on
separate lnes.

However I have no such Selection available in RowSource.

Another instruction says


The combo and list box controls allow you to enter a list of items.
When you choose this route, you enter in the control's Row Source
property a setting in the form of

"item1";"item2";"item3"

But if I enter that into RowSource, Excel tells me

Could not set the RowSource property. Invalid property value.

Very frustrating! Anyone know why this isn't working?

Thanks - Kirk



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 156
Default Adding a Value List to Combo Box

On Tue, 20 Feb 2007 23:00:24 -0500, "Tom Ogilvy"
wrote:

where are you getting these instructions.


Mainly from hours of Googling around and being sent up many garden
paths :)

Are they for Excel.


So it says. I don't know, and I can't make it work.

I don't use
Access, but it seems It is possible in Access (although I believe the
correct way is a combination of the two ways you describe) - anyway to the
best of my knowledge it isn't possible in Excel for a listbox/combobox from
the control toolbox toolbar.


I've lost you there. Caqn I rephrase the question ?

Can you have a list or combo box displaying e.g. three choices,
Info1, Info2, Info3. The words 'Info1" etc aren't in a cell on a
sheet but are hard wired (constants ?)

In excel, you can use additem to add items to a listbox or combobox at
runtime or assign the rowsource/listfillrange property to a range either
using the properties window or at runtime.


I'll search more for AddItem. May fluke a decent example.

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.


I don't follow, sorry. I've only these choices under Data

Data
BoundColumn
ColumnCount
ColumnHeads
ColumnWidths
ControlSource
ListStyle
RowSource
Text
TextColumn
TopIndex


Thanks - Kirk
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Adding a Value List to Combo Box

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

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.

--
Regards,
Tom Ogilvy



"kirkm" wrote:

On Tue, 20 Feb 2007 23:00:24 -0500, "Tom Ogilvy"
wrote:

where are you getting these instructions.


Mainly from hours of Googling around and being sent up many garden
paths :)

Are they for Excel.


So it says. I don't know, and I can't make it work.

I don't use
Access, but it seems It is possible in Access (although I believe the
correct way is a combination of the two ways you describe) - anyway to the
best of my knowledge it isn't possible in Excel for a listbox/combobox from
the control toolbox toolbar.


I've lost you there. Caqn I rephrase the question ?

Can you have a list or combo box displaying e.g. three choices,
Info1, Info2, Info3. The words 'Info1" etc aren't in a cell on a
sheet but are hard wired (constants ?)

In excel, you can use additem to add items to a listbox or combobox at
runtime or assign the rowsource/listfillrange property to a range either
using the properties window or at runtime.


I'll search more for AddItem. May fluke a decent example.

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.


I don't follow, sorry. I've only these choices under Data

Data
BoundColumn
ColumnCount
ColumnHeads
ColumnWidths
ControlSource
ListStyle
RowSource
Text
TextColumn
TopIndex


Thanks - Kirk

  #5   Report Post  
Posted to microsoft.public.excel.programming
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
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 function of adding % jenn Excel Worksheet Functions 2 November 3rd 09 11:44 PM
Adding values to a combo box [email protected] Excel Programming 2 December 1st 06 04:12 PM
Adding Items To a combo Box LoveCandle[_28_] Excel Programming 4 April 7th 06 09:58 PM
Filtered list for Combo Box ListFillRange - Nested Combo Boxes DoctorG Excel Programming 3 February 23rd 06 12:15 PM
adding info to combo box JT[_2_] Excel Programming 0 February 17th 05 11:04 PM


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