View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default 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