muchtoyearn
New Member
- Joined
- Sep 8, 2022
- Messages
- 1
- Office Version
- 365
- 2021
- Platform
- Windows
Hello! I am essentially just saving off a Worksheet "x", as a completely separate Workbook. I want this new workbook to be non-editable. It essentially acts as an audit or ledger of sorts that proves a validation was run, and we do not want people to be able to edit the resulting file. Otherwise that defeats the purpose of an immutable audit / ledger. Any help on what kind of VBA code that entails would be greatly appreciated. Here's a sample of the code I'm using:
Sub Log_Today_Validation()
'
'Log_Today_Validation Macro
'
Sheets("TodayValidation").Select
Sheets("TodayValidation").Copy
ActiveWorkbook.SaveAs Filename:= _
"https://indices.sharepoint.com/sites/IndexOps/Shared Documents/Validations/Test Folder/ValidationLog" & Format(Now, "MMDDYY") & ".csv" _
, FileFormat:=xlCSVUTF8, CreateBackup:=False
ActiveWindow.Close
End Sub
Sub Log_Today_Validation()
'
'Log_Today_Validation Macro
'
Sheets("TodayValidation").Select
Sheets("TodayValidation").Copy
ActiveWorkbook.SaveAs Filename:= _
"https://indices.sharepoint.com/sites/IndexOps/Shared Documents/Validations/Test Folder/ValidationLog" & Format(Now, "MMDDYY") & ".csv" _
, FileFormat:=xlCSVUTF8, CreateBackup:=False
ActiveWindow.Close
End Sub