Deleting a macro button in an output file

A

AB

Hi,
I've created a macro to save from a master file (.xlt file - contains
formulas) into one that contains only values ('slave' file - .xls, removing
all formula) and assigned it to a button using the form menu.

This button sits in the Master file.

However once the slave file is created the macro button is saved with it - i
want to remove the macro button as part of the programing - ie save file as
"filename'.xls with the macro removed so that other users of the slave file
won't have it to muck with.

Much thanks in advance
AB
 
C

CurlyDave

Hi,
I've created a macro to save from a master file (.xlt file - contains
formulas)  into one that contains only values ('slave' file - .xls, removing
all formula) and assigned it to a button using the form menu.  

This button sits in the Master file.

However once the slave file is created the macro button is saved with it - i
want to remove the macro button as part of the programing  - ie save file as
"filename'.xls with the macro removed so that other users of the slave file
won't have it to muck with.

Much thanks in advance
AB

try
Worksheets("Sheet1").Buttons.Delete
 

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

Top