Home |
Search |
Today's Posts |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Word looks like it has a rowsource property if you look in the object
browser, but it apparently doesn't. I doubt autocad does either. -- Regards, Tom Ogilvy "Dave Baranas" wrote in message ... Hi Tom, Hi Tom I am now over in Autocad trying to hook back up with Excel. If Autocad supports VBA just like Microsoft Excel supports it and both objects expose the Rowsource property, then I think I am now driving a 1973 Ford Torino that has the Rowsourse light on the dashboard but does not come on until you buy the LTD version. In other words There are a lot of idiot lights in VBA that do not really work the way they are supposed to. Regards Dave On Sun, 7 Dec 2003 19:45:30 -0500, "Tom Ogilvy" wrote: I ran this from Excel with a userform named Mn Sub SetList() Dim ObjXL As Object Dim ObjActiveWkb As Object Dim lstRange As Excel.Range Dim lstValue As Variant Set ObjXL = GetObject(, "Excel.Application") Set ObjActiveWkb = ObjXL.Application.ActiveWorkbook 'Set Main List With ObjActiveWkb 'Form Initialize will pass through here Set lstRange = .Worksheets("CalcWin").Range("A2:AI101") LstVal = lstRange.Value ' not needed Mn.lstMain.ColumnCount = lstRange.Columns.Count Mn.lstMain.RowSource = lstRange.Address(External:=True) Mn.lstMain.ColumnHeads = True End With Mn.Show Set ObjActiveWkb = Nothing: Set ObjXL = Nothing End Sub worked fine for me. However, you talk about being outside Excel without being specific. According to this article: http://support.microsoft.com/default...43&Product=wrd Word, Powerpoint, and Outlook do not have a rowsource property for the listbox and don't support columnheads. I suspect you will have to go back to using the array approach and do without the column heads. |
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 |