LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 621
Default active cell to run macro

Please make correction to MyC15Macro

Should read MyC1Macro


Gord

On Mon, 06 Feb 2012 12:11:14 -0800, Gord Dibben
wrote:

Auric has pointed you to a method use a selection chamge event.

There are other event types you could use if you choose

BeforeRightClick

BeforeDoubleClick

Sample code..............................

Private Sub Worksheet_BeforeDoubleClick( _
ByVal Target As Excel.Range, Cancel As Boolean)
Select Case Target.Address(False, False)
Case "A1"
Cancel = True
MyA1Macro
Case "B1"
Cancel = True
MyB1Macro
Case "C1"
Cancel = True
MyC15Macro
End Select
End Sub


Gord

On Mon, 06 Feb 2012 11:19:23 -0600, kalpesh
wrote:

Hello,

it is possibel that when in sheet1 a1 cell is active to run macro

 
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
Macro-active cell puiuluipui Excel Discussion (Misc queries) 3 March 14th 10 04:21 PM
run macro although blinking cursor is active in an active cell bartman1980 Excel Programming 1 December 20th 07 11:29 AM
Macro to paste in the active cell the contents of a cell from another file?? LarryB Excel Programming 3 June 12th 06 06:37 PM
Run macro in active cell ku Excel Programming 4 August 6th 04 06:36 PM
Run a macro in the active cell. Jasmine[_2_] Excel Programming 1 January 5th 04 03:47 PM


All times are GMT +1. The time now is 10:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"