Print

Print


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$B$3" Then
MsgBox "Hi there.  Cell B3 was just selected..."
End If
End Sub

Regards Ron

----- Original Message -----
From: "BENNETT, Marc, GARMUK" <[log in to unmask]>
To: <[log in to unmask]>
Sent: Friday, January 12, 2001 4:22 PM
Subject: Re: Is it possible to make a macro run if a particular cell or ra
nge is selected?


> I think I need to eplain better.
> The scenario I am picturing is this:
>
> A user is working on a spreadsheet, no macros are running.
> Then they select a particular cell and macro launches.
>
> can this be done, and if so how?
>
>         Marc Bennett.
>
>         GATX Asset Residual Management Ltd
>         St Andrew's House, West Street, Woking GU21 1EA
>         Telephone:  01483 747133
>         Fax:  01483 727679
>         Website:  www.gatxuk.com
>
>
>         GATX Asset Residual Management Ltd  is a Joint Venture between
>         GATX International Limited and Lombard North Central PLC
>         Registered Office:  3 Princess Way, Redhill, Surrey RH1 1NP
>         Registered in England 2732402
>
> > -----Original Message-----
> > From: [log in to unmask] [SMTP:[log in to unmask]]
> > Sent: 12 January 2001 15:10
> > To:   [log in to unmask]
> > Subject:      Re: Is it possible to make a macro run if a particular
cell
> > or range is selected?
> >
> > Technically, it already exists -- The Worksheet_SelectionChange event.
> > Just do a test to see if the active cell or selection  intersects with
> > your
> > desired test range.   If so, run macro code, if not, exit.
> >
> >
> >
> >
> >
> > A list to stimulate discussion about the technical aspects of the
> > developme
> > <[log in to unmask]> on 01/12/2001 09:55:02 AM
> >
> > Please respond to A list to stimulate discussion about the technical
> >       aspects of the developme <[log in to unmask]>
> >
> > To:   [log in to unmask]
> > cc:
> > Subject:  Is it possible to make a macro run if a particular cell or
range
> >       is selected?
> >
> >
> >         Is it possible to make a macro run if a particular cell or range
> > is
> > selected?
> >
> >         Marc Bennett.
> >
> >         GATX Asset Residual Management Ltd
> >         St Andrew's House, West Street, Woking GU21 1EA
> >         Telephone:  01483 747133
> >         Fax:  01483 727679
> >         Website:  www.gatxuk.com
> >
> >
> >         GATX Asset Residual Management Ltd  is a Joint Venture between
> >         GATX International Limited and Lombard North Central PLC
> >         Registered Office:  3 Princess Way, Redhill, Surrey RH1 1NP
> >         Registered in England 2732402