Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Create a command button to click other buttons simultaneously

  Asked By: Glenn    Date: Mar 01    Category: MS Office    Views: 1212
  

I want a command button to be created which will click other command
buttons, so that i can perform many tasks together.

Eg. I have a command button in sheet1, which is ClearContent for a
certain range and another command button in Sheet2, which changes the
colorIndex of a certain range and 3rd command button in sheet3 to
make the fonts big. Can i make another button in sheet1 to click all
the 3 buttons together to do their respective jobs simultaneously????

Of late i have been posting many messages, please bear with me since
i am studying VBA, and at the same time working in stock exchange
where i need data to be manupulated in different ways.

I have to thank all of you and specially Mr. Ray Blake, who always
tried to help me.

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Cadeo Nguyen     Answered On: Mar 01

You could create  a command  button that runs the code associated with each of
the other command buttons.

For example, when you click  the command button  labeled "Combined" it runs
the following code (we'll assume that the first command button runs code
called "commandbutton1", the second one runs "commandbutton2", etc.)

public sub combined()

commandbutton1
commandbutton2
commandbutton3

end sub

 




Tagged: