Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 363
Default run macro on a CommandButton from another sheet

I am trying to get a macro linked to a commandbutton to run, from another code in another sheet, but
casnnot get the code right.

Tried:

Sheet2.CommandButton2.Select etc to no avail

What is the line of code to run it ?

Corey....


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 363
Default run macro on a CommandButton from another sheet

Nevermind, just worked it out as i placed the post.
Removed the Private from the Commandbutton2 _Click Sub and when i typed in Sheet2.
The Commandbutton2_Click was then listed.
Yay!

Corey....
"Corey" wrote in message ...
I am trying to get a macro linked to a commandbutton to run, from another code in another sheet, but
casnnot get the code right.

Tried:

Sheet2.CommandButton2.Select etc to no avail

What is the line of code to run it ?

Corey....



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 to link a commandbutton in excel sheet to a VB userform? Julian Excel Programming 2 May 24th 07 02:52 AM
Calling sub from CommandButton knowing which sheet is active gtslabs Excel Programming 3 April 20th 07 10:21 PM
Save a copy of particular sheet minus VBA, CommandButton of parent workbook [email protected] Excel Programming 2 September 25th 06 10:48 AM
Adding commandbutton to sheet ckoch Excel Programming 1 June 1st 06 10:03 PM
Macro won't run from CommandButton Nathan Gutman Excel Programming 3 December 24th 03 07:59 PM


All times are GMT +1. The time now is 06:30 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"