View Full Version : [SOLVED:] Expand/Contract a User Form
phendrena
10-24-2008, 08:20 AM
Hi,
Is it possible to expand/contract a user form?
I want the user form to display a standard set of items but i then want the user form to expand to the right and display further entry options when the user clicks a "more options" button (can use a spinner control?).
Any suggestions on how I could do this?
Thanks,
fb7894
10-24-2008, 08:48 AM
Here's code that allows the user the ability to resize the form....
http://www.andypope.info/vba/resizeform.htm
If you'd rather set the size yourself, you can manipulate the .width and .height properties of the userform.
david000
10-25-2008, 12:51 AM
A simpler approach is to use the caption property, then toggle the height and width.
Private Sub OptionsButton_Click()
If OptionsButton.Caption = "Options >>" Then
Me.Height = 164
OptionsButton.Caption = "<< Options"
Else
Me.Height = 128
OptionsButton.Caption = "Options >>"
End If
End Sub
The attachment is from John Walkenbach.
phendrena
10-27-2008, 01:44 AM
A simpler approach is to use the caption property, then toggle the height and width.
Private Sub OptionsButton_Click()
If OptionsButton.Caption = "Options >>" Then
Me.Height = 164
OptionsButton.Caption = "<< Options"
Else
Me.Height = 128
OptionsButton.Caption = "Options >>"
End If
End Sub
The attachment is from John Walkenbach.
Thats exactly what i'm looking for.
Thank you.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.