ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Filling a listbox with transpose of a range from an excel sheet (https://www.excelbanter.com/excel-programming/331326-filling-listbox-transpose-range-excel-sheet.html)

viswanthank

Filling a listbox with transpose of a range from an excel sheet
 

Hi I am doing some programming with VBA on excel and I am trying to fil
a list box with data from a range of cells on an excel sheet. I jus
could not figure out how to do this.

ex:

with userform1.listbox1
.column count = 5
.column = ("D1:CT5")
end with

userform1.show


If somebody can help me out, that will be great.

Thanx,
Viswanthan

--
viswanthankPosted from http://www.pcreview.co.uk/ newsgroup acces


Tom Ogilvy

Filling a listbox with transpose of a range from an excel sheet
 
with userform1.listbox1
.columncount = 5
.List = Application.Transpose(Range("D1:CT5").Value)
end with

userform1.show

--
Regards,
Tom Ogilvy


"viswanthank" <viswanthank.1qd4hy@ wrote in message
...

Hi I am doing some programming with VBA on excel and I am trying to fill
a list box with data from a range of cells on an excel sheet. I just
could not figure out how to do this.

ex:

with userform1.listbox1
column count = 5
column = ("D1:CT5")
end with

userform1.show


If somebody can help me out, that will be great.

Thanx,
Viswanthank


--
viswanthankPosted from http://www.pcreview.co.uk/ newsgroup access




viswanthank

Filling a listbox with transpose of a range from an excel sheet
 

Hi Cool that worked great.

I tried that already but did not know that I have to use .value at th
end.

Anyway, thanks a lot.

Viswanthan

--
viswanthankPosted from http://www.pcreview.co.uk/ newsgroup acces



All times are GMT +1. The time now is 08:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com