Really nice little tool!!!
I'm looking for a bit of help though. I've used the following code and
it does what I am looking for. However on my userform I have 75 labels,
45 checkboxes, 50 Textboxes, 4 multipages and 9 frames. How can I write
the code in such a way that I can modify the size of each element, but
without the need to list each element separately within the code.
Apologies if this is a rather simple question, but I'm only recently
started using VBA.
Private Sub FlexGrabberE1_ResizeComplete(WidthFactor As Single,
HeightFactor As Single)
With Me
With .Label1
..Left = .Left * WidthFactor
..Width = .Width * WidthFactor
..Top = .Top * HeightFactor
..Height = .Height * HeightFactor
End With
With .MultiPage1
..Left = .Left * WidthFactor
..Width = .Width * WidthFactor
..Top = .Top * HeightFactor
..Height = .Height * HeightFactor
End With
With .TextBox1
..Left = .Left * WidthFactor
..Width = .Width * WidthFactor
..Top = .Top * HeightFactor
..Height = .Height * HeightFactor
End With
End With
End SubKen Macksey wrote:
*Hi
There is a freeware control available at www.VBusers.com that will
allow
you to resize a VBA form and all controls on it with minimal code.
Look for FlexGrabberE in the downloads section.
HTH
Ken
*
---
Message posted from
http://www.ExcelForum.com/