Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 65
Default Double-click event for cells?

If someone double-clicks on any cell, how can I determine the row number of that cell and possibly change the color of the first (leftmost) cell of that row?

For example, if someone double clicks on cell J2, then I want to change the color of cell A2 to color blue.

-Robert
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,182
Default Double-click event for cells?

If someone double-clicks on any cell, how can I determine the row number of
that cell and possibly change the color of the first (leftmost) cell of that
row?

For example, if someone double clicks on cell J2, then I want to change the
color of cell A2 to color blue.

-Robert


You could use the Worksheet_BeforeDoubleClick event for that worksheet -OR- the
Workbook_SheetBeforeDoubleClick event in ThisWorkbook.

ActiveSheet.Cells(Target.Row, 1).Interior.Color = vbBlue

To remove:

ActiveSheet.Cells(Target.Row, 1).Interior.ColorIndex = xlNone

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
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
Is there a double click event for cell? Ayo Excel Discussion (Misc queries) 3 June 6th 08 12:18 AM
Double Click Event on Image Redan Excel Programming 0 March 27th 08 08:36 AM
Double click event on Cell kirkm[_6_] Excel Programming 3 March 5th 07 05:23 AM
userform label double-click goes to click event John Paul Fullerton Excel Programming 3 May 19th 06 05:54 PM
Before Double Click Event gregork Excel Programming 4 February 9th 04 09:17 AM


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