LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 115
Default Macro to slightly modify the subroutine

I have a command button in Sheet3. The code in the backend for this
command button is
Call command1

When the user clicks the button, Sheet3 will copied and renamed as
Sheet4. So, all the objects of sheet3 including the commnand button
will be copied to sheet4. But, I would like to change the code for
this button in sheet4 as
Call command2 instead of being Call command1

Similarly, when the user clicks the button again in sheet3, it will be
copied as sheet5 and the command button should have code
Call command3 instead of being Call command1

Is there any macro that can modify the subroutine slightly? Please let
me know. Thanks

 
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
Creating macro for slightly complicated formula CNN Excel Discussion (Misc queries) 1 May 4th 10 06:40 AM
Call a subroutine using variable subroutine name dhstein Excel Discussion (Misc queries) 3 July 26th 09 08:28 PM
Calling a VBA add in from a macro subroutine [email protected] Excel Programming 1 April 6th 07 10:09 PM
How To Quit Subroutine from a called subroutine Rich J[_2_] Excel Programming 5 February 20th 07 06:48 PM
How do I exit a macro subroutine? John Excel Worksheet Functions 1 January 15th 06 02:08 AM


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