+ Reply to Thread
Results 1 to 6 of 6

Scroll Bars In VBA User Forms????

  1. #1
    Registered User
    Join Date
    11-28-2006
    Posts
    55

    Scroll Bars In VBA User Forms????

    Hi
    Can anyone tell me how to get the vertical scroll bars that I've inserted into a text box within a VBA userform to start at the top????
    They work fine but when you click on the command button on my excel sheet the form appears as it should except that the scroll bar is all the way at the bottom so the upper text is cut off.
    I'm sure there must be a pretty simple fix.

    Cheers

  2. #2
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628
    You may use this macro:
    Please Login or Register  to view this content.
    See the attached file UserForm. I hope it's what you need.

    Regards,
    Antonio
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    11-28-2006
    Posts
    55
    Thanks for your help.
    I could not find a user form attached to the example that you sent me and i dont know where to paste the code that you described into.
    Sorry if I sound a bit thick.

    Thanks anyway.

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Is your TextBox prepopulated ?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  5. #5
    Registered User
    Join Date
    11-28-2006
    Posts
    55
    You really are talking to a beginer here!!!
    Not sure what you mean by prepopulated.
    I created a new form in VBA which has a text box in it and pasted in text from word.

    Cheers

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    I sure what what you mean. You must be pasting into the Textbox with the userForm activated, so rset the Scrollbar using the TextBox_Exit event.

    In the VB Editor select your UserForm then double click on the TextBox. make sure that Textbox is selected in the left hand drop down. In the right hand drop down find Exit then paste this code.

    Please Login or Register  to view this content.

+ 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