+ Reply to Thread
Results 1 to 10 of 10

Commandbutton backcolor depends on caption

  1. #1
    Registered User
    Join Date
    03-11-2017
    Location
    Philippines
    MS-Off Ver
    2013
    Posts
    59

    Commandbutton backcolor depends on caption

    Hi, Everyone!

    I'm working on a seat plan project wherein if button was clicked it'll turn to green if the seat was taken however I can't seem to figure out what to do with the update that I need to do.

    Example:
    Seat 354 was reported that there was an issue with headset it should turn YELLOW IF someone pressed on the seat 354 (if it was reported previously reported that there was an issue) a Msgbox should also show the issue it has however IF it was tagged as resolved already then the button will turn green again IF pressed.

    I would really appreciate if someone will help me out.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,653

    Re: Commandbutton backcolor depends on caption

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    03-11-2017
    Location
    Philippines
    MS-Off Ver
    2013
    Posts
    59

    Re: Commandbutton backcolor depends on caption

    Hi!
    I tried the code however it still stated the issue even though it was tagged as resolved ("YES")
    THank you for your help!

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,653

    Re: Commandbutton backcolor depends on caption

    Quote Originally Posted by serenitylai View Post
    Hi!
    I tried the code however it still stated the issue even though it was tagged as resolved ("YES")
    THank you for your help!
    It worked for me using your example workbook. Seat 151 had a resolved issue and didn't show a message.

  5. #5
    Registered User
    Join Date
    03-11-2017
    Location
    Philippines
    MS-Off Ver
    2013
    Posts
    59

    Re: Commandbutton backcolor depends on caption

    it doesn't work on mine. Is it possible if it's due to the version of excel that I'm using?

  6. #6
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,653

    Re: Commandbutton backcolor depends on caption

    It's not a version issue.

    Are you using the same example workbook that you posted?
    Did you change the code in any way?
    Did you put YES in column D; not "Y" or "Yes " ?

  7. #7
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Commandbutton backcolor depends on caption

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Kind regards
    Leo
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    02-22-2016
    Location
    Harare, Zimbabwe
    MS-Off Ver
    2007 & 2010
    Posts
    71

    Re: Commandbutton backcolor depends on caption

    Maybe?

    Please Login or Register  to view this content.
    Happy? Click the * to the left.

  9. #9
    Registered User
    Join Date
    03-11-2017
    Location
    Philippines
    MS-Off Ver
    2013
    Posts
    59

    Re: Commandbutton backcolor depends on caption

    sorry for the very late reply. Will tag this as solved. Thank you for the codes!

  10. #10
    Registered User
    Join Date
    02-22-2016
    Location
    Harare, Zimbabwe
    MS-Off Ver
    2007 & 2010
    Posts
    71

    Re: Commandbutton backcolor depends on caption

    Heelo serenitylai,

    You are welcome, glad we help solve your issue.

    Thank you for adding to my Reputation.

    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. Problem Backcolor Commandbutton MAC
    By pant88 in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 3
    Last Post: 02-10-2014, 05:18 AM
  2. [SOLVED] CommandButton caption from a different workbook
    By cboud in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-19-2014, 01:29 PM
  3. [SOLVED] CommandButton caption set on open
    By JimDandy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-14-2013, 05:36 PM
  4. CommandButton Caption Text Clipped
    By ahartman in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-14-2009, 06:20 PM
  5. Commandbutton caption change
    By peter.thompson in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-22-2005, 02:29 AM
  6. Commandbutton backcolor change on event
    By peter.thompson in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-17-2005, 06:15 AM
  7. Caption disappears from CommandButton.
    By Ed in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-19-2005, 05:06 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