yoyoyojohnny
Technical User
Hi,
I have a problem with my macro writing in Excel:
I have 4 worksheets with one button on each of them. When I want to perform something, I have to click each of these buttons. That means I have to: go to sheet1 and click the button; go to sheet2 and click the button; go to sheet3 and click the button; go to sheet4 and click the button.
Intead of that, I want to put one additional button on each worksheet that, once clicked, would trigger the click event for all the four existing buttons. So that, no matter what sheet I am looking at, when I click the "general" button, I will have the program execute the code for all 4 existing buttons.
I know that I am doubling the work here: a button that would click another button. You could ask: why not to write the code for each already existing button - the code that would handle all the tasks in each worksheet, but the reason is that I basically gave the same name to all the existing buttons and the variables have the same name etc. So it wil be a pain in the neck to redefine all this (the code is long). I would like it the way it is with one more button on each worksheet that, as I described, would push me the existing buttons without me going to each sheet and doing it myself.
I tried to activate the worksheet and the buttons on those worksheets, but it did not work, maybe I was doing somehting wrong... Please help me with this issue.
Hope my question is clear.
I have a problem with my macro writing in Excel:
I have 4 worksheets with one button on each of them. When I want to perform something, I have to click each of these buttons. That means I have to: go to sheet1 and click the button; go to sheet2 and click the button; go to sheet3 and click the button; go to sheet4 and click the button.
Intead of that, I want to put one additional button on each worksheet that, once clicked, would trigger the click event for all the four existing buttons. So that, no matter what sheet I am looking at, when I click the "general" button, I will have the program execute the code for all 4 existing buttons.
I know that I am doubling the work here: a button that would click another button. You could ask: why not to write the code for each already existing button - the code that would handle all the tasks in each worksheet, but the reason is that I basically gave the same name to all the existing buttons and the variables have the same name etc. So it wil be a pain in the neck to redefine all this (the code is long). I would like it the way it is with one more button on each worksheet that, as I described, would push me the existing buttons without me going to each sheet and doing it myself.
I tried to activate the worksheet and the buttons on those worksheets, but it did not work, maybe I was doing somehting wrong... Please help me with this issue.
Hope my question is clear.