Changing Listbox Columnwidths

Topher

Registered User.
Local time
Today, 01:53
Joined
Apr 18, 2000
Messages
72
Oky Doky heres me problem.

i'm trying to list the results from 4 different queries in 1 list box. the results show up depending on what the user selects. that works find and dandy, BUT what i want to do is make some of the columns smaller and some larger - depending on the result chosen. i know you can do it with the properties of the list box - but i want to do it programatically altering that property - i've tried it with the code

listbox.columnwidths = "1;2;1"

but when i view the list box i only see the 1st column and thats it - the rest disappear. is there a way to do this at all programatically?

if so please help!

thanks lots
Topher
 
Easy fix. It's a problem with twips. You should list your code with a measurement:

listbox.columnwidths = "1 in;2 in;1 in"

or

listbox.columnwidths = "1 cm;2 cm;1 cm"

You don't have to do this in the properties window but you must in VBA.
 
SWEET!!! it works!

thanks guy!
 

Users who are viewing this thread

Back
Top Bottom