ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Scrolling in Multipages (https://www.excelbanter.com/excel-programming/292178-scrolling-multipages.html)

Omar[_4_]

Scrolling in Multipages
 
Guys,

I have created a userform where I have put a multipage in
it. In each page of this multipage I'm putting alot of
things which causes me to enable the vertical scrolling
obtion on in the property of each page. However, I could
not get it working. For some reason this option is not
working. although it shows the scroll bar at the right
of the form it does not work; i.e.; it does not show the
rest of the buttons and text boxes at the bottom of the
form.

Can any body help me with this.

Greg Wilson[_4_]

Scrolling in Multipages
 
You seem to be getting ingnored. What did you set the
Scrollheight property to?

The following code will is proven to work in xl2000. You
need only to run the macro. You may have to correct for
wordwrap and for the doubling of periods within With/End
With statements. Test it and see if it works. If not
we'll need more info.

Sub TestScrollbars()
Dim i As Integer, ii As Integer
Dim UF As Object, TB As Control
Dim Multi As MultiPage
Set UF = Application.VBE. _
ActiveVBProject.VBComponents.Add(3)
UF.Properties("Height") = 200
UF.Properties("Width") = 130
Set Multi = UF.Designer.Controls.Add("Forms.MultiPage.1")
With Multi
..Height = 160
..Width = 115
..Top = 5
..Left = 5
End With
For i = 0 To 1
Multi.Pages(i).ScrollBars = 2
Multi.Pages(i).ScrollHeight = 350
For ii = 1 To 20
Set TB = Multi.Pages(i).Controls.Add("Forms.TextBox.1")
With TB
..Font.Size = 8
..Left = 10
..Top = ii * 15 + 5
..Height = 15
..Width = 40
..Text = "Test"
End With
Next ii
Next i
VBA.UserForms.Add(UF.Name).Show
ThisWorkbook.VBProject.VBComponents.Remove UF
End Sub

Regards,
Greg

-----Original Message-----
Guys,

I have created a userform where I have put a multipage in
it. In each page of this multipage I'm putting alot of
things which causes me to enable the vertical scrolling
obtion on in the property of each page. However, I could
not get it working. For some reason this option is not
working. although it shows the scroll bar at the right
of the form it does not work; i.e.; it does not show the
rest of the buttons and text boxes at the bottom of the
form.

Can any body help me with this.
.



All times are GMT +1. The time now is 10:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com