Hide button from Template

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top