multiple list boxes height value on a form

roosn

Registered User.
Local time
Today, 18:20
Joined
Jul 29, 2005
Messages
121
Hi

on a form i have 4 list boxes in a line side by side, beneath these list boxes is one button, and beneath the button is 4 list boxes side by side

what i would like to do is have the button top value just below the largest height from the list boxes above, which is driven by the listcount value.

i cant use a max value in vba of the the 4 list boxes listcount value,

is there an alternative way of determining the maximum height / listcount value from these 4 list boxes

thank you in advance

R
 
there is no rowheight property for a listbox which you can use with listcount to determine a height for the control - and the rowheight will vary depending on the font.

The maximum height would be the height of the section the control is in less the top value of the control.

If you want the max listcount for the for boxes you will need a user function - something like

Code:
function maxcount(a as long, b as long, c as long, d as long) as long
dim maxnum as long

    maxnum=a
    if maxnum<b then maxnum=b
    if maxnum<c then maxnum=c
    if maxnum<d then maxnum=d
    maxcount=maxnum

end function
 

Users who are viewing this thread

Back
Top Bottom