Try to do a count of the length of each line in your listbox : compare to the highest value, if the value is higher change the max to it. Move to nexr
dim intMax as integer
for I=0 to list.count do
if len(list.column(0,I) > intMax then intMax=len(list.column(0,I)
end
list.height=intMax '...