Hi,
I have a Tracker workbook that opens another workbook (PT, as master copy), copies across some details, creates an appropriate directory and saves the PT workbook under another name (client and case number).
The PT workbook requires a password to open, has its own macro and has SaveAsUI 'disabled'. The population and general control of the PT workbook is handled by the Tracker workbook - but the user has the ability to 'stamp' the PT workbook to update the status of a process.
So far this all works fine. The trouble comes when I try and save a copy of the PT workbook to another location (different drive share, for a different audience). I want this PT Copy to be updated (overwritten) each time the workbook is saved to this secondary location. Sometimes prompted by the Tracker macro sometimes by the user directly - it doesn't make any difference.
I have used SaveCopyAs in the past but it won't work in this case as I need to remove the password to open file and prevent the user from running any macros. I've tried using SaveAs and CreateBackup but it doesn't behave how I would expect / need, and haven't been able to find out much on the interweb-googly-whatsit.
This is the code I currently have in the PT workbook:
When this code is executed the Recs copy is saved but retains password protection and the Command Button (StampExit1) is still visible - exactly the same as the normal working version.![]()
Please Login or Register to view this content.
Am I barking up the wrong tree here? I tried going down the route of copying the sheet contents to another workbook (but sometimes there are more sheets than one) and it's a pain to change the colour pallette, formatting, delete hidden rows & columns etc, etc. It just feels so clunky and wrong.
I'm after SaveCopyAs functionality but with the password removed, the command button hidden and the 'main working copy' of the file to remain open for the user.
Is this possible? Feel like I'm missing something here...
Thanks as always, TC
Bookmarks