Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Toggle Excel cell color with Mouse click

Status
Not open for further replies.

skipjakk

Technical User
Feb 25, 2002
18
US
I'm trying to create a section in a spreadsheet that will allow a user to click on a cell and change its color. I could probably code something, but wondering if there's toolbox control I could use that would work better? Or is coding the best route, as I would have to read the cell color for decisioning later on?
 




Hi,

This is something that you would have to perform with VBA code.

Please post in Forum707.

Skip,
[sub]
[glasses] When a diminutive clarvoyant had disappeared from detention, headlines read...
Small Medium at Large[tongue][/sub]
 
You have some options though. I say this because code will only get you so far. With code, there is the SelectionChange event. But once you click on a target cell, you must navigate away from this cell and then back again to fire the event. If you do not navigate away, any subsequent clicks will not fire the event, thus not take action upon the clicked cell.

Options you have is to use Conditional Formatting on the cell value, or use conditional formatting pointing to another cell where you can change the value, such as an in-cell drop down box with Data Validation (List).

HTH

Regards,
Zack Barresse

Simplicity is the ultimate sophistication. What is a MS MVP? PODA
- Leonardo da Vinci
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top