Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default double click macros

Private Sub Worksheet_BeforeDoubleClick _
(ByVal Target As Range, Cancel As Boolean)
Set Target = Range("A1")
If Target.Address = ActiveCell.Address Then
MsgBox "Run Macro 1"
Else
Set Target = Range("A2")
If Target.Address = ActiveCell.Address Then
MsgBox "Run Macro 2"
Else
Set Target = Range("A3")
If Target.Address = ActiveCell.Address Then
MsgBox "Run Macro 3"
End If
End If
End If
End Sub

"jack" wrote:

Can someone help me on how I can set up two different double click macros
(two different resulting actions) on the same worksheet for different
ranges. I have each macro starting with: Private Sub
Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean). I
found very quickly that it doesn't work. What do I need to do so that each
will work independently?
Any basic direction would be appreciated.



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
double click macros Mike Excel Programming 0 September 26th 07 04:32 AM
double click macros Alok[_3_] Excel Programming 0 September 26th 07 04:27 AM
userform label double-click goes to click event John Paul Fullerton Excel Programming 3 May 19th 06 05:54 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
Mouse Over Graph, Capture Information on Click(Double Click) Dean Hinson[_3_] Excel Programming 1 December 6th 04 04:49 AM


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