+ Reply to Thread
Results 1 to 8 of 8

Change selected page in MultiPage form

  1. #1
    Registered User
    Join Date
    03-08-2017
    Location
    Victoria, Canada
    MS-Off Ver
    2013
    Posts
    4

    Change selected page in MultiPage form

    I have a 9 page multipage form. I want the user to be taken back to page one if an error is encountered on any other page. If I run the following code the highlighted page tab changes but the information from the page on which the error was encountered continues to be displayed. How do I get it to give up focus and display the information on the first page?

    Please Login or Register  to view this content.

  2. #2
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Change selected page in MultiPage form

    See if adding
    Please Login or Register  to view this content.
    to the end of your posted code works.
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

  3. #3
    Registered User
    Join Date
    03-08-2017
    Location
    Victoria, Canada
    MS-Off Ver
    2013
    Posts
    4

    Re: Change selected page in MultiPage form

    If I add that code where txtObject is a text box on Page 1 I get this error 'Run time error 2110:'

    "Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus"

  4. #4
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Change selected page in MultiPage form

    Do you have a textbox or any other type of field on page 1?

  5. #5
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Change selected page in MultiPage form

    Hi,

    Which event are you running that code in? It won't work from the Multipage change.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  6. #6
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Change selected page in MultiPage form

    Good point D...I hadn't thought of that.

  7. #7
    Registered User
    Join Date
    03-08-2017
    Location
    Victoria, Canada
    MS-Off Ver
    2013
    Posts
    4

    Re: Change selected page in MultiPage form

    Yes I am accessing and calling the various pages through the Multipage change event. Is there another way of doing this?

    [code]
    Private Sub MultiPage1_Change()

    ElseIf MultiPage1.value = 1 Then
    Call LoadSchedule

    ElseIf MultiPage1.value = 2 Then
    Call LoadBudget

    etc...

    [code/]

  8. #8
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Change selected page in MultiPage form

    I would recommend hiding the tabs and using Next and Previous buttons to actually move through the pages. That way you can simply not move if a page is incomplete.

    By the way, the tags are [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code] rather than [code/]

+ 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. Issue with multipage form page changes
    By jerH in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 01-11-2016, 10:05 AM
  2. how to switch multipage page from multipage change event??
    By jed38 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-27-2015, 10:31 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. Changing the Color of Page on a MultiPage Form
    By NaNaBoo in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-31-2009, 04:21 AM
  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. Adding controls to each page in a multipage form
    By michael fuller in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-13-2006, 05:50 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