Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Is it possible run code when a cell is doubleclicked?

Is it possible run code when a cell is doubleclicked?

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,345
Default Is it possible run code when a cell is doubleclicked?

See your other post in microsoft.excel.

--

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


with @tiscali.co.uk


"sumGirl" wrote in message
oups.com...
Is it possible run code when a cell is doubleclicked?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
Default Is it possible run code when a cell is doubleclicked?

You can't call a macro from a cell with something like

=if(a11,domymacro)

But you can trap event such as double clicking on a sheet using:-

Private Sub Workbook_SheetBeforeDoubleClick(ByVal Sh As Object, ByVal Target
As Range, Cancel As Boolean)
msg = "You double clicked"
MsgBox (msg)
End Sub

You could also use the sheet change event to detect the change of a
particular cell and call a macro

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Not Application.Intersect(Target, Range("A1")) Is Nothing Then
If Target.Value "" Then
msg = "You changed A1"
MsgBox (msg)
End If
End If
End Sub


Mike
"sumGirl" wrote:

Is it possible run code when a cell is doubleclicked?


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
Cell value not recognized by code. Brady Excel Discussion (Misc queries) 8 December 21st 06 02:56 AM
How to Add Rows From Active Cell with in a XLL Code Sheraz Excel Worksheet Functions 0 August 8th 06 01:17 PM
How can I rate a cell 1-5 and colour code it? treetop40 Excel Worksheet Functions 2 August 9th 05 12:15 PM
How to refer to a cell format code? A difficult problem Excel Discussion (Misc queries) 1 May 25th 05 08:42 AM
Relative Cell References within VBA code Jandy Excel Discussion (Misc queries) 2 April 21st 05 02:17 AM


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