I have a file that has a password on it. To save the file without a password I click save as and then next to save choose tools, general options, delete the password that's already there and then save the workbook.
What's the VBA code to do the above so that the file gets saved without a password? My code is below:
COLLATERALfile = "\\Nas01\shared\RSH\TECH\Operations\Futures Ops\Archive\Futures Pledged Collateral Report " & _
Format(Date, "mm.dd.yy") & ".xlsx"
Workbooks.Open COLLATERALfile, Password:="Agico6nm"
ActiveWorkbook.SaveAs Filename:= _
"\\us1.1corp.org\NY1\Users\RSingh\Documents\Download #2 - Futures Pledged Collateral Report.xlsx" _
, FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False, WriteresPassword:=""
Set COLLATERALBook = ActiveWorkbook
COLLATERALBook.Close savechanges:=False
What's the VBA code to do the above so that the file gets saved without a password? My code is below:
COLLATERALfile = "\\Nas01\shared\RSH\TECH\Operations\Futures Ops\Archive\Futures Pledged Collateral Report " & _
Format(Date, "mm.dd.yy") & ".xlsx"
Workbooks.Open COLLATERALfile, Password:="Agico6nm"
ActiveWorkbook.SaveAs Filename:= _
"\\us1.1corp.org\NY1\Users\RSingh\Documents\Download #2 - Futures Pledged Collateral Report.xlsx" _
, FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False, WriteresPassword:=""
Set COLLATERALBook = ActiveWorkbook
COLLATERALBook.Close savechanges:=False