Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Why is Referenced Workbook Saved When ActiveWorkbook is Saved?
I have a workbook saved as an Add-In that I use as a Reference for a Data
workbook. I have this code in the Data workbooks Before Save Event. For some reason , when I save the Data workbook the Reference Add-In workbook is saved also, why? I noticed the last modified date changes to the Data workbooks last modified date. I do not want the Add-In saved when the Data workbook is saved. Any ideas on fixing this? ' save a copy in public Power Vault folder strBackUpPath = "\\Powervault\Global Schedule BU\" ThisWorkbook.SaveCopyAs (strBackUpPath & ThisWorkbook.Name) ' ' get computer network user name Set objNetwork = CreateObject("Wscript.network") myUserName = objNetwork.UserName ' save a copy in Ryan's My Documents if ryanh is signed in If myUserName = "ryanh" Then strBackUpPath = "C:\Documents and Settings\ryanh\My Documents\Ryan's BackUp Programs\Global Schedule BackUps\" ThisWorkbook.SaveCopyAs (strBackUpPath & ThisWorkbook.Name) End If -- Cheers, Ryan |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Why is Referenced Workbook Saved When ActiveWorkbook is Saved?
On Oct 29, 3:36 pm, RyanH wrote:
I have a workbook saved as an Add-In that I use as a Reference for a Data workbook. I have this code in the Data workbooks Before Save Event. For some reason , when I save the Data workbook the Reference Add-In workbook is saved also, why? I noticed the last modified date changes to the Data workbooks last modified date. I do not want the Add-In saved when the Data workbook is saved. Any ideas on fixing this? ' save a copy in public Power Vault folder strBackUpPath = "\\Powervault\Global Schedule BU\" ThisWorkbook.SaveCopyAs (strBackUpPath & ThisWorkbook.Name) ' ' get computer network user name Set objNetwork = CreateObject("Wscript.network") myUserName = objNetwork.UserName ' save a copy in Ryan's My Documents if ryanh is signed in If myUserName = "ryanh" Then strBackUpPath = "C:\Documents and Settings\ryanh\My Documents\Ryan's BackUp Programs\Global Schedule BackUps\" ThisWorkbook.SaveCopyAs (strBackUpPath & ThisWorkbook.Name) End If -- Cheers, Ryan Are you sure that the addin has been saved? When an addin is open the Date Modified is when it was opened for use (at least on my computer). I don't see where you interacted with the addin. Do you change anything in the addin when it is being accessed by your code? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I recover an Excel document saved not saved as | Excel Discussion (Misc queries) | |||
How can I see a copy of a saved workbook before I saved it again? | Excel Worksheet Functions | |||
How to get saved old saved work that was saved over? | Excel Discussion (Misc queries) | |||
Activeworkbook.Saved | Excel Programming | |||
internet explorer (ie) issue with activeworkbook.saved (save prompt) AAARGH. | Excel Programming |