LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default userform listbox columnheads

Any Help?

I have a listbox in a word form. i want the rowsource to reference my excel
document. If i do this in excel VBA it works fine, but when i try it in word
VBA it will not. The following are the two lines that work in excel but not
word.

wbUserFile.ActiveSheet.Cells(2, 2).Resize(5).Select
lstGraphInfo.RowSource = MyExcel.Selection.Address(External:=True)

thanks

--
Jeff "Spike" Zapinski



"Norman Jones" wrote:

Hi Borg,

Try:
'=============
Private Sub UserForm_Activate()
With Me.ListBox1
.RowSource = "A2:E25"
.ColumnHeads = True
.ColumnCount = 4
End With
End Sub
'<<=============


---
Regards,
Norman


"borg" wrote in message
...
Hi,

I used rowsource to set the data into a listbox and then set the
columnheads
to true hoping that the first row of the data would be fill into the
header.
But no such luck. Here is what I've tried:

with userform1
.listbox1.rowsource="A1:E25"
.columnheads=true
end with

Is there a way to make the column headers be the data in cells "A1:E1"?

Thanks.




 
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
How to add data to ColumnHeads of Listbox lehainam[_3_] Excel Programming 1 June 3rd 05 12:57 PM
ListBox.ColumnHeads Property Kevin Excel Programming 4 July 16th 04 10:55 AM
UserForm ListBox Otto Moehrbach[_6_] Excel Programming 3 December 30th 03 06:22 PM
Listbox ColumnHeads Dave Baranas[_2_] Excel Programming 6 December 8th 03 10:13 PM
ListBox ColumnHeads Soniya Excel Programming 1 October 7th 03 12:50 PM


All times are GMT +1. The time now is 09:37 AM.

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"