PC Review


Reply
Thread Tools Rate Thread

Re: active cell to run macro

 
 
Gord Dibben
Guest
Posts: n/a
 
      6th Feb 2012
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
<(E-Mail Removed)> wrote:

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

 
Reply With Quote
 
 
 
 
Gord Dibben
Guest
Posts: n/a
 
      6th Feb 2012
Please make correction to MyC15Macro

Should read MyC1Macro


Gord

On Mon, 06 Feb 2012 12:11:14 -0800, Gord Dibben <(E-Mail Removed)>
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
><(E-Mail Removed)> wrote:
>
>>Hello,
>>
>> it is possibel that when in sheet1 a1 cell is active to run macro

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
run macro although blinking cursor is active in an active cell bartman1980 Microsoft Excel Programming 1 20th Dec 2007 12:29 PM
referring to formula in a non active cell from active cell nickname Microsoft Excel Misc 1 21st Jun 2007 12:11 PM
Active / Passive to Active / Active? troy.bruder@gmail.com Microsoft Windows 2000 Advanced Server 1 13th Jul 2006 03:56 PM
How to create/run "cell A equals Cell B put Cell C info in Cell D =?Utf-8?B?YWJtYjE2MQ==?= Microsoft Excel Misc 5 26th Jan 2006 07:36 PM
Can a a 2 node cluster support both active/active and active/passive configurations John H Microsoft Windows 2000 Advanced Server 0 19th Sep 2005 02:16 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:53 PM.