+ Reply to Thread
Results 1 to 3 of 3

Changing cell content based on button

  1. #1
    Registered User
    Join Date
    02-09-2005
    Posts
    79

    Changing cell content based on button

    I have created two buttons in a worksheet to navigate to two other worksheets. I would like a cell to display 'YES' automatically if one of the two buttons is clicked and or to display 'NO'. I also would like to change the colors of these cells change automatically depending on which button is pressed. Can someone please help me with some hints? Thanks.
    Last edited by VBA Noob; 10-14-2008 at 05:43 PM.

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Good evening vioravis
    Quote Originally Posted by vioravis View Post
    Can someone please help me with some hints? Thanks.
    You just want hints? Not the code to do it? How refreshing

    Go to Tools > Maco > Record New Macro and click OK.
    Now select the cell you want to affect and type "No" into it.
    Now change it's colour.
    Click on the stop button on your macro toolbar.
    Draw a button using the Forms toolbar and when asked to assign a macro click on the title of the macro in the little box and click OK.

    You've just written your first macro and this button will now run your little program.

    Welcome to the club and happy coding.

    HTH

    DominicB
    Please familiarise yourself with the rules before posting. You can find them here.

  3. #3
    Registered User
    Join Date
    02-09-2005
    Posts
    79
    Thanks dominicb. It works fine.

+ 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. Changing Cell Fill Colour based on another cell value
    By MoonWeazel in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-02-2008, 10:15 AM
  2. Sending email based on cell content
    By Hoosteen in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-20-2007, 02:08 PM
  3. selecting cell content based on value
    By Beanymonster in forum Excel General
    Replies: 5
    Last Post: 02-06-2007, 08:10 AM
  4. Option Buttons, copying
    By Dfire in forum Excel General
    Replies: 21
    Last Post: 12-12-2006, 04:53 AM
  5. Changing the value of a cell based on the value of another cell
    By Joenash in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 12-11-2006, 06:46 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