Identify which field was double-clicked

User avatar
AlanMiller
BronzeLounger
Posts: 1545
Joined: 26 Jan 2010, 11:36
Location: Melbourne, Australia

Identify which field was double-clicked

Post by AlanMiller »

I'm playing around with a document which contains several macrobutton fields. Part of the action is to change the code for the field using VBA, according to user input. I need to know if there is a method available to identify which field in the fields collection the user just activated i.e. the .Fields(index) value that needs to have the changes applied to.

thanks
Alan

I think I have found one option:

Code: Select all

Debug.Print Selection.Fields(1).Index
but if there are better alternatives, I'd still like to know.

User avatar
HansV
Administrator
Posts: 78492
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Identify which field was double-clicked

Post by HansV »

I don't think there's a simpler solution.
Best wishes,
Hans