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: 83
Default on double click change cell color

I put this code in the worksheet's code module

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _
Cancel As Boolean)
'on double click change color to show selection

If Not Intersect(Target, Range("A15")) Is Nothing Then
Target.Select
With Selection.Interior
.ColorIndex = 42
.Pattern = xSolid
End With
Cancel = True
End If
End Sub

But the Target is not changing to the desired color. I've tried to change
the Range part to other values and nothing works.
Can anybody see what I'm doing wrong?

As usual any help will be most appreciated!

--
gaba :)
 
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
Cell requires double click to 'activate' date format change BLTibbs Excel Discussion (Misc queries) 4 April 2nd 23 01:38 PM
How to change syperlink from single click to double click syperlinker Excel Worksheet Functions 0 June 13th 08 05:01 PM
Click on graph bar to execute a double-click in a pivot table cell [email protected] Charts and Charting in Excel 4 August 3rd 05 01:37 AM
Change cell back color on click Dave Peterson Excel Discussion (Misc queries) 0 January 24th 05 10:50 PM
how do I: click in cell and make it change color? jasonsweeney Excel Programming 7 January 21st 04 09:17 PM


All times are GMT +1. The time now is 02:18 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"