Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
comboBox vs Listbox
I'm stumped!!
I am trying to populate a Combobox from a range of data. Using the code below, I can fill a listbox. However, If I add ComboBox1 to the form and change the code below from "Me.ListBox1.AddItem cell.Value" to "Me.ComboBox1.AddItem cell.Value", I get an error: Runtime error 70 Permission denied. Can someone help? Private Sub UserForm_Initialize() Dim cell As Range Dim rng As Range With ThisWorkbook.Sheets("shOrder") Set rng = .Range("a4", .Range("a4").End(xlDown)) End With For Each cell In rng.Cells Me.ListBox1.AddItem cell.Value Next cell End sub -- Steve |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Combobox/Listbox Difference | Excel Discussion (Misc queries) | |||
Combobox v Listbox | New Users to Excel | |||
Combobox/listbox | Excel Discussion (Misc queries) | |||
Combobox or Listbox | Excel Programming | |||
listbox-combobox category | Excel Programming |