Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Changing coloue cell en text colour by clicking cell

Hi.

In a worksheet i want to change colour te red and the text colour to white
when a click one of the cell in the range O22:X44.
Is this possible?

Hannes


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,522
Default Changing coloue cell en text colour by clicking cell

On Saturday, March 24, 2012 2:16:13 AM UTC-5, hannes wrote:
Hi.

In a worksheet i want to change colour te red and the text colour to white
when a click one of the cell in the range O22:X44.
Is this possible?

Hannes


Right click sheet tabview code copy this for a DOUBLE click

Private Sub Worksheet_BeforeDoubleClick _
(ByVal Target As Range, Cancel As Boolean)

If Intersect(Target, Range("o22:x44")) _
Is Nothing Then Exit Sub

With Target
.Interior.ColorIndex = 46
.Font.ColorIndex = 2
End With
End Sub
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Changing coloue cell en text colour by clicking cell


Right click sheet tabview code copy this for a DOUBLE click

Private Sub Worksheet_BeforeDoubleClick _
(ByVal Target As Range, Cancel As Boolean)

If Intersect(Target, Range("o22:x44")) _
Is Nothing Then Exit Sub

With Target
.Interior.ColorIndex = 46
.Font.ColorIndex = 2
End With
End Sub


Thanks works perfect. Would it be possible to undo the changes by clicking
again?


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,522
Default Changing coloue cell en text colour by clicking cell

On Saturday, March 24, 2012 2:16:13 AM UTC-5, hannes wrote:
Hi.

In a worksheet i want to change colour te red and the text colour to white
when a click one of the cell in the range O22:X44.
Is this possible?

Hannes

Private Sub Worksheet_BeforeDoubleClick _
(ByVal Target As Range, Cancel As Boolean)
If Intersect(Target, Range("o22:x44")) _
Is Nothing Then Exit Sub
With Target
If .Interior.ColorIndex = 46 Then
..Interior.ColorIndex = 0
..Font.ColorIndex = 1
Else
..Interior.ColorIndex = 46
..Font.ColorIndex = 2
End If
End With
End Sub


On Saturday, March 24, 2012 2:16:13 AM UTC-5, hannes wrote:
Hi.

In a worksheet i want to change colour te red and the text colour to white
when a click one of the cell in the range O22:X44.
Is this possible?

Hannes




On Saturday, March 24, 2012 2:16:13 AM UTC-5, hannes wrote:
Hi.

In a worksheet i want to change colour te red and the text colour to white
when a click one of the cell in the range O22:X44.
Is this possible?

Hannes

Reply
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 colour cell and text by clicking cell hannes New Users to Excel 2 March 16th 12 04:06 PM
Colour by clicking cell ronoee New Users to Excel 12 January 29th 07 12:07 AM
how to change cell colour by simply clicking on it lovebunny Excel Discussion (Misc queries) 9 August 10th 06 07:48 PM
Changing row colour if text string present in a cell? StargateFan[_3_] Excel Programming 3 September 10th 04 01:08 PM
Changing colour of text in cell Steve Lowe Excel Programming 5 January 25th 04 07:35 PM


All times are GMT +1. The time now is 03:13 PM.

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"