+ Reply to Thread
Results 1 to 5 of 5

Code runs only if a specific page of the MultiPage is selected

  1. #1
    Forum Contributor Gabor's Avatar
    Join Date
    02-15-2004
    Location
    Székesfehérvár, Hungary
    MS-Off Ver
    xl2016
    Posts
    226

    Code runs only if a specific page of the MultiPage is selected

    How do I do this right?

    I am on a UserForm codepage in VBE.
    I want my code run on the event of a certain page of the MultiPage1 is selected, the one that has the Tag property set to "Pic"

    Current solution:

    Please Login or Register  to view this content.
    Works, but I would like to improve it so when I move the page backward or forward I do not need to remember to adjust the value property in the above code.

    So the desire would be this:

    Please Login or Register  to view this content.
    (Of course .justselectedpage or .justactivatedpage does not exist.)

    Is it possible?
    Regards,

    Gabor

    Protect trees.. maybe one day we need to climb back....

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Code runs only if a specific page of the MultiPage is selected

    I can't see what the problem is with the first code, any change in the multipage will call the sub, if Page 7 is "active"
    Hope that helps.

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

    Free DataBaseForm example

  3. #3
    Forum Contributor Gabor's Avatar
    Join Date
    02-15-2004
    Location
    Székesfehérvár, Hungary
    MS-Off Ver
    xl2016
    Posts
    226

    Re: Code runs only if a specific page of the MultiPage is selected

    It works, but...
    I had the nasty experience, once the userform I provided to someone did not work properly after I customized it but forgot to adjust the property.
    So it is to eliminate this failure mode happening again, and increasing programming security once I create a clone of the file equipped with the userform.

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Code runs only if a specific page of the MultiPage is selected

    Provided you only want the sub to run with page 7 I can't see a problem

  5. #5
    Forum Contributor Gabor's Avatar
    Join Date
    02-15-2004
    Location
    Székesfehérvár, Hungary
    MS-Off Ver
    xl2016
    Posts
    226

    Re: Code runs only if a specific page of the MultiPage is selected

    Next time I might use the same standard content on page #3, or #2.
    Or one of my buddies move the page for their application and wonder why the functionalities not working, since they do not know they have to adjust.
    It is not a problem really, it would be an improvement item for my convenience for the next application development.
    And to fulfill curiosity of 'can this be done?'.

+ 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