Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Calling command button from another sheet

I have a workbook with 6 sheets inside.
5 have data and each have one button to process the data.

i require to run each button from the first sheet to get a summary
of the data.

how do i call the buttons on the other sheets and display the data
on the first.

thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Calling command button from another sheet

That depends entirely on what kind of buttons you have. There are 2 types of
buttons. Buttons from the forms toolbar attach to macros stored in standard
code modules. To run those you can just run the macro's. You may need to
select the appropraite sheet with the buttons prior to calling the macros if
the code references the active sheet. If the buttons are from the control
toolbox then the code can be run by changing the scope fo the button from
private to public and then you can access the button fairly easily. Let me
know which buttons you have if you need more info that this...
--
HTH...

Jim Thomlinson


"Ian" wrote:

I have a workbook with 6 sheets inside.
5 have data and each have one button to process the data.

i require to run each button from the first sheet to get a summary
of the data.

how do i call the buttons on the other sheets and display the data
on the first.

thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Calling command button from another sheet

Thanks jim,

I am using the button from the control toolbox.

cheers




On Wed, 12 Apr 2006 08:58:02 -0700, Jim Thomlinson
wrote:

I


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Calling command button from another sheet

Assuming you have a button embeded in sheet1 (code name) called
CommandButton1...

goto to the code for the buttons and change it to Public...
Public Sub CommandButton1_Click()

Now in a sub in sheet 2 you should be able to reference the button using
Sub TestButtons
Call Sheet1.CommandButton1_Click
end sub
--
HTH...

Jim Thomlinson


"Ian" wrote:

Thanks jim,

I am using the button from the control toolbox.

cheers




On Wed, 12 Apr 2006 08:58:02 -0700, Jim Thomlinson
wrote:

I



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Calling command button from another sheet


thanks for your help.
cheers

On Wed, 12 Apr 2006 09:16:02 -0700, Jim Thomlinson
wrote:

Assuming you have a button embeded in sheet1 (code name) called
CommandButton1...

goto to the code for the buttons and change it to Public...
Public Sub CommandButton1_Click()

Now in a sub in sheet 2 you should be able to reference the button using
Sub TestButtons
Call Sheet1.CommandButton1_Click
end sub




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
How do I create a command button to jump from sheet to sheet in a. Darlenew Excel Worksheet Functions 3 March 22nd 05 10:36 PM
Calling Com addin from form button on sheet? Robin Hammond[_2_] Excel Programming 8 January 8th 05 03:03 AM
Running a Command Button from a different sheet Lester Lee Excel Programming 5 July 14th 04 05:15 PM
Command Button slides when sheet is redrawn Pubert Excel Programming 0 April 16th 04 05:35 PM
Hiding A Sheet Command Button With VBA Minitman[_3_] Excel Programming 2 March 7th 04 01:16 AM


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

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

About Us

"It's about Microsoft Excel"