+ Reply to Thread
Results 1 to 3 of 3

userform is large.....how to use scrollbar of userform to show all of the userform

  1. #1
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,662

    userform is large.....how to use scrollbar of userform to show all of the userform

    I created a "dynamic" userform based off of some code that i found on the internet. I seem to have it working.

    Let me tell you kinda what it does and then explain my issue.
    The user indentifies how many Quizes and problems per quiz. I then show the userform to get the possible points per problem. The issue is that IF the user wants say 3 quizes with say 12 questions/problems per quiz then the userform height is too large for the screen.

    I did activate the scroll bar for the userform and as long as i go into the properties of the userform and set the scrollbar properties to the following then things work ok.
    Keepscrollbarsvisible = 2
    scrollbars = 2
    scrollheigh = 10000

    The problem is that for a scrollheight > than userform height i think it will work ok. However, if i use scrollheight of 10000 this means there will be a lot of "unpopulate" space at the bottom of the userform. I was thinking that if i could also update the scrollheight based on what the userform height is that i could get rid of this "unpoplulated" space.

    Does this make sense?

  2. #2
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: userform is large.....how to use scrollbar of userform to show all of the userfor

    When you initialize the userform, you should be able to set the properties. So make the scrollheight = the userform height. That will do it, right?
    Is your code running too slowly?
    Does your workbook or database have a bunch of duplicate pieces of data?
    Have a look at this article to learn the best ways to set up your projects.
    It will save both time and effort in the long run!


    Dave

  3. #3
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,662

    Re: userform is large.....how to use scrollbar of userform to show all of the userfor

    since the userform is dynamic.......i cant set it during the initialize step ...at least i dont think so and still have it work.

    What i did find works is the following:
    Once i have finished adding controls to the userform.........so i know the userform height wont change any more.......i then set this height to the "scrollheight" and then i reduce the actual userform height to something that will fit on the screen. It works.......i think.
    Not as professional looking as some i have seen but it works ok.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1