Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
set up a command button to print multiple workbook casper Excel Discussion (Misc queries) 2 August 28th 09 12:00 AM
Counting, command button and programming in VB ElFrodo Excel Discussion (Misc queries) 5 February 23rd 07 05:24 AM
Programming a "Save as..." command button within Excel DavidHawes Excel Discussion (Misc queries) 2 November 13th 06 02:48 PM
Refresh Multiple Queries via a Command Button Dmorri254 Excel Programming 2 February 27th 06 03:45 PM
Programming command button to execute on a different worksheet Ed[_21_] Excel Programming 4 July 29th 04 12:17 AM


All times are GMT +1. The time now is 03:43 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"