Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Mar 2008
    Posts
    98
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Scroll bar in user form (Excel 2003)

    I've never had the opportunity to use a scroll bar on a user created form. I'm not sure if it's capabilities are limited to things such as zoom or if it can really allow me to scroll up and down on a form. I've put together a mock user form with no real code in it. On this form I have a frame that contains currently 7 radio style / option buttons. Ideally I'd like to be able to utilize the scroll bar in the frame to allow me to scroll up and down so that I can add additional radio buttons inside the frame without having to make the form or frame any bigger than they already are. First of all is this possible. Secondly, are there any good examples out there that I could take a look at to see what other capabilities are available with the scroll bar on the user forms. Perhaps a sample of how to use the scroll bar on the user form would be great if it's not to much trouble. Thanks for any help!!
    Attached Files Attached Files

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Scroll bar in user form (Excel 2003)

    If you want to be able to scroll the frame, you shouldn't use a scrollbar control, but set the Scrollbars property of the frame to 2 - fmScrollBarsVertical, and set its ScrollHeight property to a value larger than its Height. This will make the interior of the frame scrollable.

    Similarly, you can set the Scrollbars property of the userform itself to 2 - fmScrollbarsVertical and its ScrollHeight property to a value larger than its Height to make the entire userform scrollable.

    The Scrollbar control can be used to let the user set the value of a variable or of another control by using the mouse instead of by typing a value.

  3. #3
    Star Lounger
    Join Date
    Mar 2008
    Posts
    98
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Scroll bar in user form (Excel 2003)

    Thanks Hans. That makes perfect sense. I guess I over looked those attributes on the frame. Thanks for your help!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •