PDA

View Full Version : Scrollbars for a Frame?



smetzger
09-09-2007, 11:41 PM
Hi,

I have a VBA form with a Frame and several TextBoxes.
The Frame has its vertical scrollbar active. The TextBoxes are positioned one below the other, but the Frame is sized such that only the first 3 TextBoxes are showing.

Problem: When I run the form the scrollbar is visible but there is no scroll position indicator and one cannot scroll down. What am I doing wrong?

Thanks,
Scott

Andy Pope
09-10-2007, 12:44 AM
You need to specify a scrollheight. Set it to a value just beyond the bottom of the last textbox. In this example I have assume Textbox3 is the last textbox.


Private Sub UserForm_Initialize()

Frame1.ScrollHeight = TextBox3.Top + TextBox3.Height + 2

End Sub