hi,
I want to enable scrollbars for the userforms created during design time. I am adding certain no of controls based on an input during runtime to the userform which was created during design time. I want to have the size of the userform fixed and if the controls are more then enable the scrollbars so that we can scroll and view the controls during runtime.
Is there any way to do this
regards,
sk80.

ScrollBars for Userforms
markj11
hi brenda,
Thanks you gave a reply.
The exact problem is not just making the scrollbars visibile. I want to make them active. I mean I want to make the scrollbars usable i.e scroll through the form. I guess thats pretty involved work.
regards,
sk80.
crixxxx87
Per our support engineer:
Base my understanding, you want to enable the ScrollBars in UserForm during runtime. If any misunderstanding, please tell me.
You can do like this.
================================
Private Sub CommandButton1_Click()
Me.KeepScrollBarsVisible = fmScrollBarsVertical
Me.ScrollBars = fmScrollBarsVertical
End Sub
================================
-brenda (ISV Buddy Team)
windsurfkid
per the engineer:
For example, during runtime, we add a textbox
Set theTextBox = Me.Controls.Add("Forms.TextBox.1", "txt1")
' Now set a bunch of properties on the TextBox.
With theTextBox
.Left = 65
.Width = 400
.Top = controlTop
=========
Then, we need to set the Scrollbar scroll event
========
e.g.
Private Sub ScrollBar1_Change()
Debug.Print Me.ScrollBar1.Value
Me.TextBox1.Left = -Me.ScrollBar1.Value
End Sub
Private Sub ScrollBar1_Scroll()
Debug.Print Me.ScrollBar1.Value
End Sub
-brenda (ISV Buddy Team)