+ Reply to Thread
Results 1 to 5 of 5

Userform Scroll bars

Hybrid View

zplugger Userform Scroll bars 01-08-2015, 11:47 AM
zplugger Re: Userform Scroll bars 01-08-2015, 12:40 PM
zplugger Re: Userform Scroll bars 01-08-2015, 04:08 PM
Andy Pope Re: Userform Scroll bars 01-09-2015, 05:09 AM
zplugger Re: Userform Scroll bars 01-09-2015, 08:44 AM
  1. #1
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Userform Scroll bars

    Can't make the scrollbar show until I click on textbox? the textbox has a lot of data but you have to click to show bar.
    With TextBox1
          .ScrollBars = fmScrollBarsVertical
          .EnterFieldBehavior = fmEnterFieldBehaviorRecallSelection
            .SelStart = 0
            .SelLength = 0
        End With
    Last edited by zplugger; 01-09-2015 at 08:43 AM.

  2. #2
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: Userform Scroll bars

    I experimented by Cutting and Pasting this Textbox onto a new Userform - one that does not have a Multipage on it. The Scrollbar shows up and works fine when I do this. Is there some issue with using a scrollbar in a Textbox when the Textbox is on a Multipage?

  3. #3
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: Userform Scroll bars

    Here is a example of what I'm trying,is this possible.When you open the userform and select key 21 you will see
    the textbox fill with data.If you click on the textbox the scrollbar shows but the cursor go to the bottom of data. Is
    it possible to have scrollbar show without clicking on textbox? if so how do you keep scrollbar to the top.
    Attached Files Attached Files

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    Re: Userform Scroll bars

    update this code
    Private Sub TV_Click()
        If NodeSelected = False Then Exit Sub
        Set xNode = TV.SelectedItem
        SelectNode xNode
        Me.Label1.Caption = xNode.FullPath
        Me.Label2.Caption = xNode.Text
        mRowNum = Val(Right(xNode.Key, Len(xNode.Key) - 3))
        UdFlag = False
        
        With Me.TextBox1
            .SetFocus
            .Text = Wb.Sheets(ShtName).Range("F" & mRowNum).Value
            .SelStart = 0
        End With
        Me.Repaint
        
        TV.SetFocus
        Me.TextBox2.Text = Wb.Sheets(ShtName).Range("G" & mRowNum).Value
        
        UdFlag = True
    End Sub
    Cheers
    Andy
    www.andypope.info

  5. #5
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: Userform Scroll bars

    Thanks Andy its works perfect.Now on to some other changes LOL.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Scroll bars
    By amsanborn in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-19-2010, 04:31 PM
  2. Scroll bars in an Excel userform
    By Shamus McShamus in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-12-2009, 05:35 AM
  3. Horizontal Bars Scroll-Bars!
    By e4excel in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 03-07-2009, 03:10 PM
  4. Scroll Bars in VBA userform
    By richardeallen in forum Excel General
    Replies: 1
    Last Post: 07-06-2007, 02:18 PM
  5. [SOLVED] scroll bars
    By vqthomf in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-06-2006, 08:15 AM

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