G
Guest
I am creating an application that uses a number of UserForms, most with
multiple listboxes. The listboxes are initially set up in what I view at the
best default layout of position and size. Prior to showing I check some
parameters and change the size accordingly. Some simple sample code:
Load UserForm1
If NumberOfListBoxes=4 Then
With UserForm1.ListBox1
..Caption="Some New Text"
If SomeOtherFactor=True Then
..Height=200
End If
End With
End If
UserForm1.Show
The problem is that the height changes are not being made consistently, even
though I know that this portion of the code is run. Am I doing something
amaturish that does not insure that the change is made? Any help would be
appreciated. Thank you.
multiple listboxes. The listboxes are initially set up in what I view at the
best default layout of position and size. Prior to showing I check some
parameters and change the size accordingly. Some simple sample code:
Load UserForm1
If NumberOfListBoxes=4 Then
With UserForm1.ListBox1
..Caption="Some New Text"
If SomeOtherFactor=True Then
..Height=200
End If
End With
End If
UserForm1.Show
The problem is that the height changes are not being made consistently, even
though I know that this portion of the code is run. Am I doing something
amaturish that does not insure that the change is made? Any help would be
appreciated. Thank you.