Vba listbox column width

NPALLATT

New Member
Joined
Jun 5, 2012
Messages
1
Hi, I want to fill a listbox with n columns so there is no space other than the text in it.

I have tried this:

listbox1.columncount = 2
listbox1.columnwidth(len(activecell.text);len(activecell.offset(0,1).text))

Or:

mystring = len(activrcell.value) or refer to the excel column width

listbox1.columnwidth(mystring;mystring2)

but I get an error message.:(

Or max of list len or something. The default width is to big and specifying the length could make it to small.
 

GTO

MrExcel MVP
Joined
Dec 9, 2008
Messages
6,154
"Hi, I want to fill a listbox with n columns so there is no space other than the text in it."

EHhh?
 

Forum statistics

Threads
1,082,478
Messages
5,365,783
Members
400,850
Latest member
Raj_Jpr

Some videos you may like

This Week's Hot Topics

Top