+ Reply to Thread
Results 1 to 5 of 5

New to Forms-How cancel Multipage change page event?

  1. #1
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In lockdown
    MS-Off Ver
    Excel 2010 (2003 to 2016 but 2010 for choice)
    Posts
    1,766

    New to Forms-How cancel Multipage change page event?

    I am just trying to create my first MultiPage.

    On page change event, I want the data on page 1 to be validated (I have the validation checks working).

    If any of the validation checks fail, I want the page change event cancelled. However I can not find a way to cancel this.

    An equally acceptable solution (if unable to cancel the change event), would be to force the multipage back to the first page.

    Can this be done?
    *******************************************************

    HELP WANTED! (Links to Forum threads)
    Trying to create reusable code for Custom Events at Workbook (not Application) level

    *******************************************************

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: New to Forms-How cancel Multipage change page event?

    don't attempt to cancel it. if you need that I suggest you hide the tabs and use your own controls-buttons, labels and whatnot-to advance the tabs. you can then enable/disable the controls as appropriate
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In lockdown
    MS-Off Ver
    Excel 2010 (2003 to 2016 but 2010 for choice)
    Posts
    1,766

    Re: New to Forms-How cancel Multipage change page event?

    Thanks for the suggestion Joseph. (I will probably end up using this). But I'm still curious - is there no way at all to either a) cancel the multiform page change or b) on change, force the user back to the first page?

    I have tried doing b) with no success:

    Please Login or Register  to view this content.
    But all the above code does is change the selected tab at the top of the multiform. It doesn't change the displayed page back to the first page. What am I doing wrong?

  4. #4
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: New to Forms-How cancel Multipage change page event?

    nothing-it simply doesn't work well which is why I said don't attempt it ;-)

  5. #5
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In lockdown
    MS-Off Ver
    Excel 2010 (2003 to 2016 but 2010 for choice)
    Posts
    1,766

    Re: New to Forms-How cancel Multipage change page event?

    This is one of those times when I wish VBA did what I want it to do rather than having to work around its limitations. Oh well. +1 for your alternative of hiding tabs & using buttons - I will do this instead.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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