Hello,
Ok, Lyla I played around a little and I came up with this.
I don't know if this is any easier then what you came up with.Code:Dim I As Integer, iMaxHeight As Integer Dim iLabelOffset As Integer For I = 0 To Label1.UBound Label1(I).Visible = False ' hide them all Next I ' set there colors Label1(0).BackColor = QBColor(4) Label1(1).BackColor = QBColor(1) Label1(2).BackColor = QBColor(6) ' get the current offset iLabelOffset = Label1(0).Top - Label1(0).Height ' multiply 100 for effect Label1(0).Height = 100 * Var1 Label1(1).Height = 100 * Var2 Label1(2).Height = 100 * Var3 ' find the tallest label For I = 0 To Label1.UBound If Label1(I).Height > iMaxHeight Then iMaxHeight = Label1(I).Height End If Next I ' set the height for all the labels For I = 0 To Label1.UBound Label1(I).Top = (iMaxHeight - Label1(I).Height) + iLabelOffset Label1(I).Visible = True Next I
Best
Roger




Reply With Quote