I am wondering if it is possible to exectute the "Action when Clicked" of a button component from other components. Essentially what I want is a virtual button press. I realize that I could just put all of the commands for my update button in every component I am using, but for my particular code, that is very tedious. My update button has several hundred lines of code and I would like to rerun the whole code in that button when any of about 20 other combo boxes or text boxes are changed. I'd prefer not to cut and past a whole block of stuff 20 times every time I make a change to the base commands.
Thanks,
Paul
procedure
Could you not put all the code inside one or more procedures, and have the Components simply contain only the appropriate procedure calls?
You might even put the code which defines those procedures inside the "hidden" StartUp Code region of the worksheet. (See top-menubar's Edit -> StartUp Code choice.)
Then you can call and re-use the same procedures in several different Components, and yet editing could be done in one single location -- wherever you define the procedures.
acer
Thanks
Thanks for your suggestions. I had thought that the code within the procedures was unique, but using the with(DocumentTools), I was able to pretty easily do as you suggested. I was able to encapsulate the setup code in procedures and distribute those procedure calls to the multiple components. Thanks,
Paul