ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Deleting a macro button in an output file (https://www.excelbanter.com/excel-programming/423932-deleting-macro-button-output-file.html)

AB

Deleting a macro button in an output file
 
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


curlydave

Deleting a macro button in an output file
 
On Feb 11, 6:34*pm, AB wrote:
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

Stringer[_11_]

Deleting a macro button in an output file
 

Try

Code:
--------------------
ActiveSheet.Buttons.Delete

--------------------


--
Stringer
------------------------------------------------------------------------
Stringer's Profile: http://www.thecodecage.com/forumz/member.php?userid=117
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=62852



All times are GMT +1. The time now is 09:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com