Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Setting ComboBox Value
I have come across a strange error.
I have a userform set up with 5 comboboxes. Each box has its item populated when you load the form based on the contents of a range on worksheet. I use the following code to update the combobox (ctl is th combobox to be populated): Dim i As Integer 'loop counter ctl.Clear PopulateReviewerList fileList With Worksheets("Reviewer Data") For i = 1 To ArrayMethods.Size(fileList) - 1 ctl.AddItem .Cells(fileList(i), 2).Value & " - " & .Cells(fileList(i) 3).Value Next i End With Once the form is loaded, a second function sets the value of the for to be the value of a cell on a spreadsheet according to this code (it' generic to reduce confusion): cbx.Value = Cells(x,y).Value I encounter a runtime error whenever the cell value is not one of th values preloaded into the box, even though the matchrequired propert is set to false. If the value matches one in the box, then there is n issue. I want the combobox to be able to be set to any value. Can someone hel me with this? Regards, Ripa -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
setting default filter setting | Charts and Charting in Excel | |||
fill combobox depending on selection from another combobox | Excel Discussion (Misc queries) | |||
Setting default pivot table field setting to "sum" | Excel Discussion (Misc queries) | |||
Sending email via macro- setting the importance setting. | Excel Programming | |||
ComboBox or what?!? | Excel Programming |