Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All
I am working from the other side trying to get back to Excel where I have lists for my Listboxes. I have the code below working to do this Sub PopulateLstBoxFromExcel() Dim MfrRange As Range, MfrVal As Variant Dim ObjXL As Object Dim ObjActiveWkb As Object Set ObjXL = GetObject(, "Excel.Application") Set ObjActiveWkb = ObjXL.Application.ActiveWorkbook With ObjActiveWkb 'Mfr Order Set MfrRange = .Worksheets("List").Range("P2:P101") MfrVal = MfrRange.Value Mn.CboMfrOrd.List = MfrVal End With Set ObjActiveWkb = Nothing: Set ObjXL = Nothing End Sub I was not able to use the rowsource property like this below when I was inside Excel Mn.LstWlInd.RowSource = Mn.LstHsNm.RowSource = "List!Y2:Z102" I am wondering if there is a way to use the Rowsource property on a listbox when you are coming back into excel to get a list. If not then I wonder if there is a way to get the variant to somehow convert back to a string so I can feed it into the rowsource. If not then I wonder if there is some black magic voodoo stuff to get column heads turned on with having to use the rowsource property. Any help in this direction would go a long way to conquer these evil beasts for everyone:) Regards, Dave Baranas |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
listbox B conditional of input in Listbox A | Excel Discussion (Misc queries) | |||
listbox.value not equal to listbox.list(listbox.listindex,0) | Excel Programming | |||
ListBox ColumnHeads | Excel Programming | |||
Is refreshing listbox rowsource in listbox click event possible? | Excel Programming | |||
Sorting ListBox results or transposing ListBox values to other cells for sorting | Excel Programming |