Ariel Constenla-Haile wrote:
Sub BtnPressed(oEvent as Object)
Dim oControl as Object
Dim oModel as Object
oControl = oEvent.Source
oModel = oControl.getModel()
End Sub
In this way, you can access the control and its model, and check what button
was pressed (by checking the control's model name, which is unique; or by
setting an action command to each button; etc. etc. use your imagination)
Just one caveat.
The button names will be unique when you add them to a document via the
controls toolbar or a wizard - but there is no requirement that they be so.
Copy controls from one document to another and most likely they will not be.
So you (the macro programmer) must take care not break uniqueness as you
modify your controls if you intend to use the names in this fashion.
Drew
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]