• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 944
  • Last Modified:

Adding a srcollbar to a userform

I've setup a userform and filled it with textboxes and labels at runtime.

The number of controls that fill the userform change depending on user input.

The number of controls can get pretty long so instead of changing the height of the userform I leave the userform height constant and from the userform properties I select
KeepScrollsBarsVisible = 2 - fmScrollBarsVertical and ScrollBars = 2 - fmScrollBarsVertical.

I have also tried playing with the ScrollHeight and ScrollWidth properties.

When the userform is run the place for the scrollbar and the arrows at either end are visible but the scrollbar itself is not.

How do I get the useform to show the scrollbar so the user can scroll down the userform?
0
SassMan
Asked:
SassMan
  • 4
  • 2
1 Solution
 
SassManAuthor Commented:
What do you mean Moved?
0
 
SassManAuthor Commented:
Thanks
0
 
BrianGEFF719Commented:
Hello SassMan,

VB Forms do not support scroll bars. You can add a scroll bar and after some very complicated code get scrolling controls that scroll with the scroll bar. I dont recommend this, it will take a long time to code all this up.


What you should consider is a tab control. You can dynamically add/remove tabs for more "form space"


Brian
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
SassManAuthor Commented:
Thanks for that.

In excel vba, why do userforms have numerous scrollbar properties then?
0
 
BrianGEFF719Commented:
I dont do VBA I only do VB. I couldn't realy advise you on VBA, are you working on a VBA project?


Brian
0
 
SassManAuthor Commented:
Yep
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now