+ Reply to Thread
Results 1 to 7 of 7

Want Textbox on Each Page of MultiPage Form to Scroll to Top When Selected

  1. #1
    Registered User
    Join Date
    12-02-2012
    Location
    Silver Bay, MN
    MS-Off Ver
    Excel 2010
    Posts
    47

    Want Textbox on Each Page of MultiPage Form to Scroll to Top When Selected

    I have a MultiPage Form, UserForm_HELP, with nineteen pages (index 0-18). Each page has a textbox (textbox1...textbox19) with vertical scrollbar which displays if text extends beyond bottom of visible box. I wish each page to open scrolled to the top, rather than the bottom which seems to be the default. After my own trial and error, I found two pieces of code on-line that apparently worked for someone but don't work in my application (see below). I would appreciate help in finding a solution. Thank You!

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

  2. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,467

    Re: Want Textbox on Each Page of MultiPage Form to Scroll to Top When Selected

    Hi there,

    See if the following code does what you need:

    Please Login or Register  to view this content.
    The above code assumes that your UserForm contains a Multipage control called MultiPage1.


    Hope this helps - please let me know how you get on.

    Regards,

    Greg M

  3. #3
    Registered User
    Join Date
    12-02-2012
    Location
    Silver Bay, MN
    MS-Off Ver
    Excel 2010
    Posts
    47

    Re: Want Textbox on Each Page of MultiPage Form to Scroll to Top When Selected

    Greg, I appreciate your giving this a shot. Unfortunately it errors out. I have tried alternatives to no avail. It is now erroring out on Set pg line. See below.

    Please Login or Register  to view this content.

  4. #4
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,467

    Re: Want Textbox on Each Page of MultiPage Form to Scroll to Top When Selected

    Hi again,

    Those error messages suggest that the code has been entered in a standard VBA CodeModule, but it must be entered in the VBA CodeModule for the UserForm in question.

    The attached workbook contains a sample UserForm with a Multipage control and three TextBoxes.

    Hope this helps - please let me know how you get on.

    Regards,

    Greg M
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    12-02-2012
    Location
    Silver Bay, MN
    MS-Off Ver
    Excel 2010
    Posts
    47

    Smile Re: Want Textbox on Each Page of MultiPage Form to Scroll to Top When Selected

    Greg, your solution works like a charm. Many thanks!! I will gladly boost your reputation. - Mandora

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft? Excel? for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,007

    Re: Want Textbox on Each Page of MultiPage Form to Scroll to Top When Selected

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  7. #7
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,467

    Re: Want Textbox on Each Page of MultiPage Form to Scroll to Top When Selected

    Hi again,

    Many thanks for your feedback and also for the Reputation increase - much appreciated

    You're very welcome - glad I was able to help.

    Best regards,

    Greg M

+ 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. Change selected page in MultiPage form
    By Don Hinz in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-14-2017, 12:18 PM
  2. Issue with multipage form page changes
    By jerH in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 01-11-2016, 10:05 AM
  3. Replies: 4
    Last Post: 08-28-2014, 02:23 AM
  4. Unable to displayed page in Multipage tab when next/back is selected
    By rrakkki in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-03-2014, 05:37 PM
  5. Autofill TextBox on each page of Multipage Userform
    By kimmcms in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 01-20-2013, 06:45 PM
  6. Code runs only if a specific page of the MultiPage is selected
    By Gabor in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-18-2009, 07:18 PM
  7. [SOLVED] Multipage form: Referencing controls on one page
    By Post Tenebras Lux in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-11-2006, 02:45 PM

Tags for this Thread

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