Consulting

Results 1 to 2 of 2

Thread: Scrollbars for a Frame?

  1. #1
    VBAX Newbie
    Joined
    Aug 2007
    Posts
    5
    Location

    Scrollbars for a Frame?

    Hi,

    I have a VBA form with a Frame and several TextBoxes.
    The Frame has its vertical scrollbar active. The TextBoxes are positioned one below the other, but the Frame is sized such that only the first 3 TextBoxes are showing.

    Problem: When I run the form the scrollbar is visible but there is no scroll position indicator and one cannot scroll down. What am I doing wrong?

    Thanks,
    Scott

  2. #2
    MS Excel MVP VBAX Mentor Andy Pope's Avatar
    Joined
    May 2004
    Location
    Essex, England
    Posts
    344
    Location
    You need to specify a scrollheight. Set it to a value just beyond the bottom of the last textbox. In this example I have assume Textbox3 is the last textbox.

    [vba]
    Private Sub UserForm_Initialize()

    Frame1.ScrollHeight = TextBox3.Top + TextBox3.Height + 2

    End Sub
    [/vba]
    Cheers
    Andy

Posting Permissions

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