ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Command Buttons (https://www.excelbanter.com/excel-discussion-misc-queries/95309-command-buttons.html)

msals22

Command Buttons
 

I have 3 sheets in my workbook...sheet 1 has 2 command buttons that
resets cells, sheet 2 has 2 command buttons that resets cells, and
sheet 3 summarizes values in sheets 1 and 2. I would like to put a
command button in sheet 3 that when clicked, clicks the command buttons
on sheets 1 and 2 to reset all values. Any ideas?


--
msals22
------------------------------------------------------------------------
msals22's Profile: http://www.excelforum.com/member.php...o&userid=30908
View this thread: http://www.excelforum.com/showthread...hreadid=554295


JLatham

Command Buttons
 
In the code for that last button simply provide the names of the Subs
attached to the other buttons on the other sheets.

Let's say that the buttons on Sheet one are attached to Subs with names like
Button01_Click
and
Button02_Click

Then your code for the new button (which will possibly be named Button06)
would look like this:
Sub Button06_Click()
Button01_Click
Button02_Click
End Sub

Normally all code for buttons placed directly on sheets ends up in a regular
code module and should be accessible without any other considerations.

"msals22" wrote:


I have 3 sheets in my workbook...sheet 1 has 2 command buttons that
resets cells, sheet 2 has 2 command buttons that resets cells, and
sheet 3 summarizes values in sheets 1 and 2. I would like to put a
command button in sheet 3 that when clicked, clicks the command buttons
on sheets 1 and 2 to reset all values. Any ideas?


--
msals22
------------------------------------------------------------------------
msals22's Profile: http://www.excelforum.com/member.php...o&userid=30908
View this thread: http://www.excelforum.com/showthread...hreadid=554295




All times are GMT +1. The time now is 02:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com