Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Dennis
 
Posts: n/a
Default Hide button from Template

I have a macro linked to a command button on an excel template. I'd like to
have the button hidden (or deleted) on the new spreadsheet the user will save
to another name.
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

Not sure when you want the button deleted, but one way to delete it is:

Worksheets("sheet1").OLEObjects("CommandButton1"). Delete

Chip Pearson has some instructions on how to remove code (or add code) on the
fly.
http://www.cpearson.com/excel/vbe.htm

Have you thought of removing the code (and button) from your template and using
another workbook for the code (maybe even a nice toolbar floating over your
workbook).



Dennis wrote:

I have a macro linked to a command button on an excel template. I'd like to
have the button hidden (or deleted) on the new spreadsheet the user will save
to another name.


--

Dave Peterson
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
Command Button VBA code Dave Peterson Excel Discussion (Misc queries) 2 January 25th 05 11:28 PM
Macro to simply bring up the Find dialogue box?? marika1981 Excel Discussion (Misc queries) 14 January 14th 05 10:47 PM
How to assign a macro to a commnd button Mickey Blue Eyes Excel Discussion (Misc queries) 2 January 4th 05 02:15 PM
command button moves Stuart Excel Discussion (Misc queries) 2 December 15th 04 05:56 PM
How do I setup a spin button in excel Andy K Excel Discussion (Misc queries) 1 November 26th 04 09:08 PM


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