In an addin's routine, user navigates and chooses a workbook
to be opened by the code (I know a copy has been opened).
I would like to be sure that when that book is closed, the
only acceptable change is the addition of a new code-created
sheet.
I can only see the following option:
open the workbook (say "testbook")
SaveAs "1" & "testbook"
Close "1" & "testbook" (perhaps not neccessary)
Open "testbook"
Do all the code
Create the new sheet
Open "1" & "testbook"
Add the new sheet to it
use DisplayAlerts=False
SaveAs "testbook"
Does this seem feasible and/or is there a better way, please?
Regards.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (
http://www.grisoft.com).
Version: 6.0.520 / Virus Database: 318 - Release Date: 18/09/2003