Or usethe Sheet Selection Change event:
Private Sub Workbook_SheetSelectionChange(ByVal Sh As
Object, ByVal Target
As Range)
If Target.Address = "$A$1" Then test
End Sub
It fires whenever cell A1 is selected.
Kind regards,
Eddy Opperdoes
-----Oorspronkelijk bericht-----
Van: MS Excel General Q & A List [mailto:KantorM AFORBES.CO.ZA]
Verzonden: maandag 13 februari 2006 8:39
Aan: EXCEL-G PEACH.EASE.LSOFT.COM
Onderwerp: Re: Assigning a macro to a cell, not to a button
or image
You could use the Change Event, so if someone changes the
contents of
the cell, it woulf fire off a macro ...
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = Range("A1").Address Then
Call test
End If
End Sub
Whewre test is the macro that you want to call and A1 is the
cell that
it is linkied to
HTH
Marc Kantor
Alexander Forbes Financial Services
A Division of Alexander Forbes Group Ltd
Reg No. 1969/018487/07
FAIS Licence No. 1177
Direct Tel : +27(11) 269-0959
Direct Fax : +27(11) 263-1779
Switchboard : +27(11) 269-0000
E-mail : KantorM Aforbes.co.za
Website : www.alexanderforbes.com
-----Original Message-----
From: MS Excel General Q & A List [mailto:EXCEL-G PEACH.EASE.LSOFT.COM]
On Behalf Of Marcel Zentveld
Sent: 13 February 2006 08:49 AM
To: EXCEL-G PEACH.EASE.LSOFT.COM
Subject: Assigning a macro to a cell, not to a button or
image
Hi there,
Is it possible to assign a macro to a cell or the content
of a cell,
and not to a button or image?
Regards,
Marcel.
---------------------------------
Relax. Yahoo! Mail virus scanning helps detect nasty
viruses!
------------------------------------------------------------
------------
--
The EXCEL-G list is hosted on a Windows NT(TM) machine
running L-Soft
international's LISTSERV(R) software. For
subscription/signoff info
and archives, see htt
p://peach.ease.lsoft.com/archives/excel-g.html .
COPYRIGHT INFO:
http://peach.ease.lsoft.com/scripts/wa
.exe?SHOWTPL=COPYRIGHT&L=EXCEL-G
Confidentiality Warning
=======================
The contents of this e-mail and any accompanying
documentation
are confidential and any use thereof, in what ever form, by
anyone
other than the addressee is strictly prohibited.
------------------------------------------------------------
--------------
The EXCEL-G list is hosted on a Windows NT(TM) machine
running L-Soft
international's LISTSERV(R) software. For
subscription/signoff info
and archives, see htt
p://peach.ease.lsoft.com/archives/excel-g.html .
COPYRIGHT INFO:
http://peach.ease.lsoft.com/scripts/wa
.exe?SHOWTPL=COPYRIGHT&L=EXCEL-G
---------------
Aan de inhoud van dit e-mailbericht kunnen geen rechten
worden ontleend.
De informatie verzonden in dit e-mailbericht is uitsluitend
bestemd voor de geadresseerde. Het Centraal Bureau voor de
Statistiek staat niet in voor de juiste en volledige
overbrenging van de inhoud van een verzonden e-mailbericht
noch voor tijdige ontvangst daarvan.
No rights may be derived from the contents of this e-mail
message.
The information in this e-mail message is intended only for
the addressee. Statistics Netherlands cannot vouch for the
correctness and completeness of the contents of e-mail
messages, nor for the timely receipt thereof.
------------------------------------------------------------
--------------
The EXCEL-G list is hosted on a Windows NT(TM) machine
running L-Soft
international's LISTSERV(R) software. For
subscription/signoff info
and archives, see htt
p://peach.ease.lsoft.com/archives/excel-g.html .
COPYRIGHT INFO:
http://peach.ease.lsoft.com/scripts/wa
.exe?SHOWTPL=COPYRIGHT&L=EXCEL-G
|