LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default Change cell font color when cell is clicked

I'm trying to find code that will change the font color or interior color in
a cell when the cell is clicked once. Then when the color changes I need to
recalculate a formula from a different cell in the same row based on which
cell was chosen and had the color change.

I was trying the following code as a start but I am getting an "End If
without a Block If" error.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("L2:M500")) Is Nothing Then
Target.Interior.ColorIndex = 5
End If
End Sub

Any help is greatly appreciated.
 
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
Cannot change font color or cell color Bezell Excel Discussion (Misc queries) 2 January 30th 09 06:12 PM
Reg. Change of font color in a cell Ravi Excel Worksheet Functions 1 June 27th 08 10:07 AM
Change font color in cell Peggy Excel Discussion (Misc queries) 2 June 24th 08 04:30 PM
Change Font Color in cell Based on another cell value John Excel Programming 2 November 18th 05 05:28 PM
How to change the default Border, Font Color, and Cell Color Elijah Excel Discussion (Misc queries) 3 November 2nd 05 11:52 PM


All times are GMT +1. The time now is 07:42 AM.

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

About Us

"It's about Microsoft Excel"