LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Listbox ColumnHeads

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
listbox B conditional of input in Listbox A Kim K Excel Discussion (Misc queries) 1 October 31st 06 08:27 PM
listbox.value not equal to listbox.list(listbox.listindex,0) ARB Excel Programming 0 October 22nd 03 12:46 AM
ListBox ColumnHeads Soniya Excel Programming 1 October 7th 03 12:50 PM
Is refreshing listbox rowsource in listbox click event possible? Jeremy Gollehon[_2_] Excel Programming 4 September 25th 03 06:45 PM
Sorting ListBox results or transposing ListBox values to other cells for sorting Rob[_8_] Excel Programming 1 July 9th 03 04:35 AM


All times are GMT +1. The time now is 05:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"