Jean-Guy
Thu Jul 08 07:45:48 CDT 2004
Bonjour,
Dans son message, < anonymous@discussions.microsoft.com > écrivait :
In this message, < anonymous@discussions.microsoft.com > wrote:
|| I don't understand. I will admit I'm not a full-time
|| programmer and just write a little when needed around the
|| office. How could a change event figure out which checkbox
|| triggered the macro and thus capture it's name? The macro
|| is triggered 'upon entry' in it's properties which starts
|| the macro. I need to be able to get that checkbox name
|| which caused the macro to run.
||
|| -thanks, Jon
Try the following code to get you going.
By the way, if you want to do something based on the checkbox state as set
by the user, it would be better to use the On Exit property so as to get the
information based on what the user did in the checkbox, not how it is before
the user does anything, which is what you would get with the On Entry call.
'_______________________________________
Sub GetName()
Dim CheckName As String
With Selection
CheckName = .FormFields(1).Name
MsgBox CheckName
End With
End Sub
'_______________________________________
--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site:
http://www.word.mvps.org