Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default running a command button from a program

I have a spreadsheet with many command buttons, each running code that takes
several minutes to complete. I'm trying to create a "master button", which
will run all of the other command buttons. You would think that a nice
simple line like:

cmdReport.Run

.... would do the trick. Unfortunately that doesn't work, nor does anything
else I have tried. The help files are not helpful on the subject and I can't
find an answer online. Can anyone help?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 147
Default running a command button from a program

I think you can call the "CommandButton_Click" EVENT for each button to
launch what you want.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default running a command button from a program

You're a genius!

And I'm an idiot... :(

Thank you so much.

"HotRod" wrote:

I think you can call the "CommandButton_Click" EVENT for each button to
launch what you want.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default running a command button from a program

Okay, next question: it works if the button is on the same sheet as the
"master button", but what if the button is on another sheet? I tried:

cmdReport_Click

....and...

Worksheets("Sheet2").cmdReport_Click

and I got an error 438 - "Object doesn't support this property or method".

Any thoughts?

"HotRod" wrote:

I think you can call the "CommandButton_Click" EVENT for each button to
launch what you want.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default running a command button from a program

You need to make them Public.


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Pete at Sappi Fine Paper"
wrote in message ...
Okay, next question: it works if the button is on the same sheet as the
"master button", but what if the button is on another sheet? I tried:

cmdReport_Click

...and...

Worksheets("Sheet2").cmdReport_Click

and I got an error 438 - "Object doesn't support this property or method".

Any thoughts?

"HotRod" wrote:

I think you can call the "CommandButton_Click" EVENT for each button to
launch what you want.







  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default running a command button from a program

Thank you very much Bob - that worked!

"Bob Phillips" wrote:

You need to make them Public.


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Pete at Sappi Fine Paper"
wrote in message ...
Okay, next question: it works if the button is on the same sheet as the
"master button", but what if the button is on another sheet? I tried:

cmdReport_Click

...and...

Worksheets("Sheet2").cmdReport_Click

and I got an error 438 - "Object doesn't support this property or method".

Any thoughts?

"HotRod" wrote:

I think you can call the "CommandButton_Click" EVENT for each button to
launch what you want.






  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default running a command button from a program

It's a pleasure Pete.

"Pete at Sappi Fine Paper"
wrote in message ...
Thank you very much Bob - that worked!

"Bob Phillips" wrote:

You need to make them Public.


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Pete at Sappi Fine Paper"


wrote in message

...
Okay, next question: it works if the button is on the same sheet as

the
"master button", but what if the button is on another sheet? I tried:

cmdReport_Click

...and...

Worksheets("Sheet2").cmdReport_Click

and I got an error 438 - "Object doesn't support this property or

method".

Any thoughts?

"HotRod" wrote:

I think you can call the "CommandButton_Click" EVENT for each button

to
launch what you want.








  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 147
Default running a command button from a program

Pete
Don't beat yourself up. IF you search for all the messages I've posted
you would noticed that the level of my intelligence is directly proportional
to the number of hours my little kids slept the night before and the number
of coffee's I've downed.

I'm not sure if you know this but the news group is here to make some of
use feel smart, some of the time.


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
Running a Command Button from a different sheet Lester Lee Excel Programming 5 July 14th 04 05:15 PM
Running command button click event code Marishah Warren Excel Programming 1 December 31st 03 07:53 AM
Stop a VB program from running Soterro Excel Programming 4 December 5th 03 07:25 PM
Running Program on a Mac ibeetb Excel Programming 0 October 16th 03 01:47 PM
Problem with VB running from a command button Tim Marsh[_2_] Excel Programming 3 July 31st 03 11:14 AM


All times are GMT +1. The time now is 03:19 PM.

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"