I have this sheet, and i send it via outlook code:
(part of code)
...
'here code to delete the button
ThisWorkbook.Sheets("TEMPLATE").Copy
Set WB = ActiveWorkbook
WB.Sheets("TEMPLATE").Name = Replace(NOME_SHEET, " ", "_") & "-" & Format(DATA1, "DDMMYYYY")
....
but before to send is possible to delete the "pulsante 1"?
delete button from workbook
-
- PlatinumLounger
- Posts: 4353
- Joined: 26 Apr 2010, 17:36
delete button from workbook
You do not have the required permissions to view the files attached to this post.
-
- Administrator
- Posts: 78416
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: delete button from workbook
If you want to delete the button from the copy, use
...
Set WB = ActiveWorkbook
WB.Sheets("TEMPLATE").Shapes("Pulsante 1").Delete
...
If you want to delete the button before copying the TEMPLATE sheet, use
...
ThisWorkbook.Sheets("TEMPLATE").Shapes("Pulsante 1").Delete
ThisWorkbook.Sheets("TEMPLATE").Copy
...
...
Set WB = ActiveWorkbook
WB.Sheets("TEMPLATE").Shapes("Pulsante 1").Delete
...
If you want to delete the button before copying the TEMPLATE sheet, use
...
ThisWorkbook.Sheets("TEMPLATE").Shapes("Pulsante 1").Delete
ThisWorkbook.Sheets("TEMPLATE").Copy
...
Best wishes,
Hans
Hans