1. Welcome to Chandoo.org Forums. Short message for you

    Hi Guest,

    Thanks for joining Chandoo.org forums. We are here to make you awesome in Excel. Before you post your first question, please read this short introduction guide. When posting or responding to questions please remember our values at Chandoo.org are: Humility, Passion, Fun, Awesomeness, Simplicity, Sharing Remember that we have people here for whom English is not there first language and we need to allow for this in our dealings.

  2. Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User


  3. When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Adding Vertical and Horizontal Scrollbars in a userform using Userform_Activate method

Discussion in 'VBA Macros' started by Prima Satria, Jan 12, 2018.

  1. Prima Satria

    Prima Satria New Member

    Dear Chandoo,

    I have to add both vertical and horizontal scrollbars in a userform, so far I have this code below for horizontal scrollbars only. The question 1, how to make a vertical scrollbar in the same userform?
    Code (vb):
    Private Sub UserForm_Activate()
        With Me
        .ScrollBars = fmScrollBarsHorizontal
        .ScrollWidth = .InsideWidth * 1.5
        End With
    End Sub
    The second question, how set the position of top scrollbar (vertical) and left scrollbar (horizontal) so it could like a freeze pane?

    Thank you
    ThrottleWorks likes this.
  2. NARAYANK991

    NARAYANK991 Excel Ninja

    Hi ,

    It would make it easier for members to help you , if you could upload your workbook which has the userform and the scrollbar(s) and the code in it.


Share This Page