PC Review


Reply
Thread Tools Rate Thread

ComboList Source

 
 
=?Utf-8?B?TWlrZSBILg==?=
Guest
Posts: n/a
 
      6th Aug 2007
I want to set the rowSource Property (The list of the combo box that pops up
when you click the pulldown) to an array that is already built. I try to
type the name of the array in the box but it doesn't allow that. What am I
missing here?
Also, how would the array be set up so that the titles of the columns of
data have a heading?
 
Reply With Quote
 
 
 
 
=?Utf-8?B?QW5vbnk=?=
Guest
Posts: n/a
 
      6th Aug 2007
This doesn't make use of the rowsource property, but it does the same thing.

Private Sub AddArray()
Dim i As Long
'Your array should already be filled at this point
For i = 0 To UBound(MyArray)
UserForm1.ComboBox1.AddItem MyArray(i)
Next i
End Sub

I don't quite understand your question regarding the headers. You need the
titles where?

------
Cheers,
Anony


"Mike H." wrote:

> I want to set the rowSource Property (The list of the combo box that pops up
> when you click the pulldown) to an array that is already built. I try to
> type the name of the array in the box but it doesn't allow that. What am I
> missing here?
> Also, how would the array be set up so that the titles of the columns of
> data have a heading?

 
Reply With Quote
 
=?Utf-8?B?TWlrZSBILg==?=
Guest
Posts: n/a
 
      6th Aug 2007
Your suggestion will satisfy this issue. Regarding the header, that is if I
could display multiple rows of data in the list of data to select from, but
that is now how this object works, so the question is not relevant. Thanks
again for your suggestion.

"Anony" wrote:

> This doesn't make use of the rowsource property, but it does the same thing.
>
> Private Sub AddArray()
> Dim i As Long
> 'Your array should already be filled at this point
> For i = 0 To UBound(MyArray)
> UserForm1.ComboBox1.AddItem MyArray(i)
> Next i
> End Sub
>
> I don't quite understand your question regarding the headers. You need the
> titles where?
>
> ------
> Cheers,
> Anony
>
>
> "Mike H." wrote:
>
> > I want to set the rowSource Property (The list of the combo box that pops up
> > when you click the pulldown) to an array that is already built. I try to
> > type the name of the array in the box but it doesn't allow that. What am I
> > missing here?
> > Also, how would the array be set up so that the titles of the columns of
> > data have a heading?

 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      6th Aug 2007
Maybe...

Option Explicit
Private Sub UserForm_Initialize()
dim myArr as Variant
'some test data
myArr = worksheets("sheet999").range("a1:A10").value
'assign the array directly to the list.
Me.Combobox1.List = myArr
End Sub

Mike H. wrote:
>
> I want to set the rowSource Property (The list of the combo box that pops up
> when you click the pulldown) to an array that is already built. I try to
> type the name of the array in the box but it doesn't allow that. What am I
> missing here?
> Also, how would the array be set up so that the titles of the columns of
> data have a heading?


--

Dave Peterson
 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      6th Aug 2007
Ps. The headings (.columnheads) can only be used when you use a .rowsource--a
range on a worksheet.



Mike H. wrote:
>
> I want to set the rowSource Property (The list of the combo box that pops up
> when you click the pulldown) to an array that is already built. I try to
> type the name of the array in the box but it doesn't allow that. What am I
> missing here?
> Also, how would the array be set up so that the titles of the columns of
> data have a heading?


--

Dave Peterson
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combolist to show checkboxes Robbie Doo Microsoft Access Reports 0 9th Jan 2008 07:19 AM
combolist array. =?Utf-8?B?U2pha2tpZQ==?= Microsoft Excel Programming 2 1st Mar 2007 01:58 PM
ComboList Query Search Funkydan Microsoft Access Forms 2 22nd Jan 2007 09:42 AM
Name Value pair in Combolist RSH Microsoft C# .NET 7 10th Jan 2006 10:55 PM
Available printers in a dropdown-combolist? NorTor Microsoft Excel Programming 2 7th Sep 2003 05:21 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:33 PM.