Hello Everyone,
I have few questions here
1. Just like what is in the subject line, I would like to learn how can I add a scrollbar within a frame that I created as well. Please see the code I created so that I can explain it further.
2. How can I create a code for whenever I change the current value of my scrollbar to reflect inside a labelbox?
Note: Every item here was created during runtime, hence I cannot create a code for each scrollbar as it can easily get adjusted.
I have few questions here
1. Just like what is in the subject line, I would like to learn how can I add a scrollbar within a frame that I created as well. Please see the code I created so that I can explain it further.
Code:
For counter = 0 To 10
Set MyFrame= Userform1.Controls.Add("Forms.Frame.1")
With MyFrame
.Name = "MyFrame" & counter
.Caption = ""
.Top = 10
.Left = 5 * 100 * counter
.Width = 100
.Height = 50
End With
For counter2 = 0 to 4
'This line is where I'm having problem with fixing
Set MyScrollBar= MyFrame & .Controls.Add("Forms.ScrollBar.1")
With MyScrollBar
.Top = MyFrame & counter + 100 + 40 * counter2
.Left = 5 + 105 * counter
.Width = 100
.Height = 15
.Min = 0
.Max = 5
End With
Next counter2
Next counter
2. How can I create a code for whenever I change the current value of my scrollbar to reflect inside a labelbox?
Note: Every item here was created during runtime, hence I cannot create a code for each scrollbar as it can easily get adjusted.