![]() |
Multiple Command button programming
I have a workbook with 5 spreadsheets in it. Each sheet has a series
of command buttons. CommandButton1 in each sheet deletes the contents of that worksheet. I would like to program a general command button in the first spreadsheet that deletes the contents of all the sheets in the workbook by activating commandbutton1 in each spreadsheet. Is this possible thank you |
Multiple Command button programming
so you have
Private CommandButton1_Click() Change that to Public CommandButton1_Click() And now you can call it from other sheets or modules something like this Sheet1.CommandButton1_Click or Sheets("mysheet").CommandButton1_Click -- HTH... Jim Thomlinson "Good Time" wrote: I have a workbook with 5 spreadsheets in it. Each sheet has a series of command buttons. CommandButton1 in each sheet deletes the contents of that worksheet. I would like to program a general command button in the first spreadsheet that deletes the contents of all the sheets in the workbook by activating commandbutton1 in each spreadsheet. Is this possible thank you |
Multiple Command button programming - Thank you I'll try this.
On Thu, 14 Sep 2006 16:35:01 -0700, Jim Thomlinson
wrote: so you have Private CommandButton1_Click() Change that to Public CommandButton1_Click() And now you can call it from other sheets or modules something like this Sheet1.CommandButton1_Click or Sheets("mysheet").CommandButton1_Click |
All times are GMT +1. The time now is 04:37 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com