LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
JEB JEB is offline
external usenet poster
 
Posts: 40
Default Changing Cell Color by clicking on a cell

I have a spreadsheet on which I want to change the background color of the
cell when the user clicks on it. Ex.

If (selection).interior.colorindex = 0 then
(selection).interior.colorindex = 4
else
(selection.interior.colorindex = 0
end if.

Basically I want to toggle the color between green and white for a give
range of cells. How do I do it?

Thank you all in advance.

JB
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing cell text color based on cell number W. Wheeler Excel Programming 1 April 23rd 07 07:24 AM
Changing cell text color based on cell number W. Wheeler Excel Programming 0 April 22nd 07 11:56 PM
Cell colors or text color changing when date in cell gets closer. Chase Excel Worksheet Functions 5 October 19th 06 08:57 AM
Code for making a cell chage color by dbl clicking, with either a Zan Dorris Excel Programming 1 February 13th 06 04:00 PM
changing cell value by double clicking it with out vba/macros ntl.news.com Excel Programming 1 November 19th 05 11:23 PM


All times are GMT +1. The time now is 10:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"