R
RyanH
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
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