MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Quick Question


Posted by Cory on July 04, 2001 9:10 AM

How do I use the .additem for a combobox to assign its values?

Or how do I set the RowSource for a particular sheet. Right now it's only accepting a1:a5 and I can't specilfy what sheet that range is on.


Posted by Cory on July 04, 2001 11:31 AM

Aladin; Dax: I know you guys know the answer to this...Please!

Posted by Dax on July 04, 2001 11:32 AM

Like this:-

If your combobox is on a worksheet right click the worksheet tab, click View Code and paste this code in: -


Private Sub Worksheet_Activate()
Me.ComboBox1.AddItem "Item 1"
Me.ComboBox1.AddItem "Item 2"
Me.ComboBox1.AddItem "Item 3"
Me.ComboBox1.AddItem "Get the idea?"
Me.ComboBox1.Text = Me.ComboBox1.List(0)
End Sub

Regards,
Dax.

Posted by Ivan F Moala on July 04, 2001 11:34 PM

Dax has answered this


You mean the ListFillRange for a combobox
ActiveX control Format as follows ;Sheet1!A1:A10


Ivan