Please Help: code inheritance among buttons

gaw
06-12-2001, 05:14 PM
Hi, everyone:
I used VBA macro to create a command button control on the first slide and wrote the sub CommandButton1_Click(), which will be activated when the button is clicked. On the second slide, the same VBA macro is run to create another command button. The question is, how can I have this button automatically inherit the code of the button on slide 1. That is, its CommandButton1_Click() sub automatically become the same as the button on its previous slide?
Thank you very much.
Gang
BTW, the answer from rsouthon (Rob) for my last question is very helpful. Thanks.

rsouthon
06-15-2001, 03:16 PM
I'm not sure about the details of your project, but you should be able to add a module with a public sub that holds the code for your command buttons. Just call the public sub everytime you want it, instead of calling the command button function.

This method is cleaner too.

Rob

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum