+ Reply to Thread
Results 1 to 3 of 3

Scroll bar starting at bottom of form

  1. #1
    Registered User
    Join Date
    02-15-2006
    Posts
    14

    Question Scroll bar starting at bottom of form

    Hi,

    I'm building a user form via VB script, and the final section of the script sets the scrollheight of the form depending on how many textboxes etc. have been added by the code.

    However, whenever the form is shown the scroll bar starts at the very bottom. I have tried the line

    UserForm.ScrollTop = 0

    However this only seems to nudge it up about 6 points (on average the scrollheight of the form is about 2000 points).

    Any help on what I need to do to start the viewable form at the top would be greatly appreciated.

    Thanks in advance,

    Adam

  2. #2
    Tom Ogilvy
    Guest

    Re: Scroll bar starting at bottom of form

    Is the control with the TabIndex zero at the top of the form?

    --
    Regards,
    Tom Ogilvy


    "Adamaths" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi,
    >
    > I'm building a user form via VB script, and the final section of the
    > script sets the scrollheight of the form depending on how many
    > textboxes etc. have been added by the code.
    >
    > However, whenever the form is shown the scroll bar starts at the very
    > bottom. I have tried the line
    >
    > UserForm.ScrollTop = 0
    >
    > However this only seems to nudge it up about 6 points (on average the
    > scrollheight of the form is about 2000 points).
    >
    > Any help on what I need to do to start the viewable form at the top
    > would be greatly appreciated.
    >
    > Thanks in advance,
    >
    > Adam
    >
    >
    > --
    > Adamaths
    > ------------------------------------------------------------------------
    > Adamaths's Profile:

    http://www.excelforum.com/member.php...o&userid=31580
    > View this thread: http://www.excelforum.com/showthread...hreadid=517368
    >




  3. #3
    Registered User
    Join Date
    02-15-2006
    Posts
    14
    That's sorted it.

    Many thanks!

    Adam

+ 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