To change the dynamic height of a listbox is the only content of a form's detail section, attach the following code to the onResize event
Private Sub Form_Resize()
'1440 twips = 1 inch
'Stop setting the size if the inside height is less than an inch tall
If (Me.InsideHeight / 1440 > 1) Then
listBox1.Height = Me.InsideHeight - 1440
End If
End Sub
No comments:
Post a Comment