+ Reply to Thread
Results 1 to 7 of 7

Command button with macro does not work correctly

  1. #1
    Registered User
    Join Date
    01-13-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    25

    Angry Command button with macro does not work correctly

    I have a command button that I am using on a worksheet. When the button is pushed it highlights a cell and when it is pushed again it highlight the other cell. Its basically an on off button for a machine. The issue is something is wrong with the code because it works in VBA by pressing the play button or play through the macro but when i press the button it will not switch. HELP! Here is the code:
    HTML Code: 

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Command button with macro does not work correctly

    Works for me from a Command Button in Excel 2007
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Registered User
    Join Date
    01-13-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: Command button with macro does not work correctly

    It does not work in 2010 im not sure if i have a setting wrong or what?

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Command button with macro does not work correctly

    Hi c_spooner1999

    Attached runs as expected in Excel 2010 (Don't know about the Colors as I'm Color Blind )
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-13-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: Command button with macro does not work correctly

    Obviously im doing something wrong then GRRRRRRR! The colors are correct but i have attached my sheet on the after tab is my button can anyone look at this and tell me what is wrong? The after tab is the one with the non-working button.
    Attached Files Attached Files

  6. #6
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Command button with macro does not work correctly

    Try
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    01-13-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: Command button with macro does not work correctly

    Thank you Jaslake!!!! Works wonders!

+ 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. Button command doesnt work while calling a macro from a macro
    By bryan444 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-06-2012, 09:39 AM
  2. Macro Doesn't Work With Command Button
    By jbmerrel in forum Excel General
    Replies: 4
    Last Post: 03-14-2012, 03:53 PM
  3. Command button not populating correctly
    By taichi56 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-18-2009, 10:32 AM
  4. U.S. Command Button Macro won't work in Australian version 2003
    By Ron in Dallas in forum Excel General
    Replies: 1
    Last Post: 12-23-2005, 01:15 PM
  5. Assign Macro to Command Button doesn't work
    By CLS in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-31-2005, 01:05 PM

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