Hello,
I just started learning how to create objects during runtime and I am currently having a problem with creating multiple frames horizontally and I can't seem to line them up properly as each frames has their own width. Can someone help me out with creating multiple frames considering that the first frame should start at "Left = 5" then move the next frame on its right without overlapping each other and with the right amount of margin?
Here's my initial code below:
I just started learning how to create objects during runtime and I am currently having a problem with creating multiple frames horizontally and I can't seem to line them up properly as each frames has their own width. Can someone help me out with creating multiple frames considering that the first frame should start at "Left = 5" then move the next frame on its right without overlapping each other and with the right amount of margin?
Here's my initial code below:
Code:
For counter = 1 To 3
Set extraFrame = Userform1.Controls.Add("Forms.Frame.1", "Frame" & counter, True)
With extraFrame
.Name = ""
.Top = 20
.Left = 5 * counter
.Width = 100
.Height = 25
End With
Next counter
Last edited: