+ Reply to Thread
Results 1 to 4 of 4

Command Button with macro

  1. #1
    Registered User
    Join Date
    09-16-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    10

    Command Button with macro

    I have a simple purchase order that has two buttons. One button print/save, I have that working Okay. The other button I want to use a message box to ask if you want a new purchase order, if no is selected exit sub. If yes is clicked, it needs to clear certain cells and add one to a cell to create the new invoice.

    I can get these to work individually, but not on the same button.

    Appreciate some help!

    I have attached the file...it does have a macro.
    OR
    Below is VBA:

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by GJR; 03-24-2014 at 01:39 PM. Reason: Wasn't sure if someone would open a macro enabled file

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Command Button with macro

    Hello GJR,

    Please use this code for the "Other" Button.

    Please Login or Register  to view this content.


    Regards
    Last edited by Winon; 03-24-2014 at 01:47 PM. Reason: Removed moderation request, as OP has added Code Tags.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Registered User
    Join Date
    09-16-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Command Button with macro

    Love it! Exactly what I needed.

    Apologies for the rule 3...thought I did it correct.

    But you just made my day!

    Thank You! Thank You!

    GJR

  4. #4
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Command Button with macro

    Hello GJR,

    You are welcome.

    Glad I could help. Thank you for correcting your thread, and for adding to my Reputation.

    Hope you are marking this thread as Solved. Edit: Done. Thank You!

    Regards.
    Last edited by Winon; 03-24-2014 at 01:56 PM.

+ 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. [SOLVED] Command Button Macro
    By mgs in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-20-2013, 09:26 PM
  2. Run a macro from a command button
    By Dave7554 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-20-2009, 11:06 AM
  3. macro will not run on command button
    By SRJ2665 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-21-2009, 09:58 AM
  4. Replies: 1
    Last Post: 09-17-2007, 09:57 PM
  5. [SOLVED] command button:Can i use a command button to open diffrrent sheets
    By Hellboy in forum Excel General
    Replies: 0
    Last Post: 11-03-2005, 11:00 AM

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