+ Reply to Thread
Results 1 to 6 of 6

Code to program a command button on a user form to advance to the next page...?

  1. #1
    Registered User
    Join Date
    01-12-2017
    Location
    Seattle, WA
    MS-Off Ver
    2010
    Posts
    15

    Code to program a command button on a user form to advance to the next page...?

    Hello,

    It seems that programming a command button to advance to the next page in a Multipage userform is simple stuff and based on searching the interwebs the following code seems to work for others that have posed this same question:

    Private Sub CMD_ProceedToPricing_Click()
    MultiPage.Value = MultiPage.Value + 1
    End Sub

    But whenever I test it I am getting a Run-time error '424': Object required...

    I am sure it is something simple that I am missing but, admittedly, I know just enough to be dangerous. The first page is named "Item Set-Up" & the second page is named "Pricing" & the name of the user form is "New Item Information"....

    Any suggestions?

    Thank you,

    Lu

  2. #2
    Valued Forum Contributor meabrams's Avatar
    Join Date
    10-03-2014
    Location
    USA
    MS-Off Ver
    2007, 2010, 2013, 2016
    Posts
    451

    Re: Code to program a command button on a user form to advance to the next page...?

    For any future post please place code tags around any macro.... If this does not happen you will get little to no help with your issue.

    What is your multipage called...? If you did not rename it and it is the first one you put in that userform then it should be named Multipage1

    So the Proper Call would be

    Please Login or Register  to view this content.
    If you are going to have next button on every page then this may be the better way of handling it
    Please Login or Register  to view this content.
    Bramz

  3. #3
    Registered User
    Join Date
    01-12-2017
    Location
    Seattle, WA
    MS-Off Ver
    2010
    Posts
    15
    Thank you for your advice but can you please explain what a code tag is (for posting any future questions in regards to macros)?

    As far as the multipage goes - I truly don't mean to sound ignorant but where would I look to see if I've changed the name of it? I don't recall changing the name of the multipage - I changed the name of the user form itself and the 2 individual pages..

    Thank you so much for your patience and help, it is greatly appreciated.

    Lu


    Quote Originally Posted by meabrams View Post
    For any future post please place code tags around any macro.... If this does not happen you will get little to no help with your issue.

    What is your multipage called...? If you did not rename it and it is the first one you put in that userform then it should be named Multipage1

    So the Proper Call would be

    Please Login or Register  to view this content.
    If you are going to have next button on every page then this may be the better way of handling it
    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor meabrams's Avatar
    Join Date
    10-03-2014
    Location
    USA
    MS-Off Ver
    2007, 2010, 2013, 2016
    Posts
    451

    Re: Code to program a command button on a user form to advance to the next page...?

    On the bar look for a # and it will put the code tags in your post then just paste your code in-between

  5. #5
    Valued Forum Contributor meabrams's Avatar
    Join Date
    10-03-2014
    Location
    USA
    MS-Off Ver
    2007, 2010, 2013, 2016
    Posts
    451

    Re: Code to program a command button on a user form to advance to the next page...?

    Sorry the picture isn't the greatest but I do not have a good photo editing software on here

    In the case I posted the name is Multipage1

    Multipage.jpg
    Last edited by meabrams; 08-01-2017 at 03:50 AM. Reason: Add text

  6. #6
    Registered User
    Join Date
    01-12-2017
    Location
    Seattle, WA
    MS-Off Ver
    2010
    Posts
    15

    Re: Code to program a command button on a user form to advance to the next page...?

    Thank you so much for your help! Turns out I had renamed it and once you helped me figure that out the code is working perfectly.

    Can't thank you enough for your kind explanation.

    Cheers!

+ 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. Disable Command Button in User form
    By Lclarke11 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-29-2015, 07:50 AM
  2. [SOLVED] Using command buttons to move from one page to another in User Form
    By Grilleman in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-11-2015, 04:24 PM
  3. Require VBA code to Get data from data table to user form using command button
    By Srikanth H N in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-01-2014, 04:17 PM
  4. [SOLVED] Erratic User Form Command Button behavior
    By RonRich in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 12-30-2013, 11:32 AM
  5. [SOLVED] Confirm Command button on user form using VBA
    By coach.32 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-23-2013, 05:56 AM
  6. Help to creat user form with command button
    By sheree08 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-28-2013, 04:10 PM
  7. Command Button on User form for Printing
    By Anthony Slater in forum Excel General
    Replies: 2
    Last Post: 09-07-2005, 03:05 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