XLS Padlock Guide
XLS Padlock Guide

Saving a secure copy of the workbook without prompt

 

 

Purpose: saving a secure copy of the workbook without prompt

Insert the following code:

Public Function SaveSecureWorkbookToFile(Filename As String) 
Dim XLSPadlock As Object
On Error GoTo Err
Set XLSPadlock = Application.COMAddIns("GXLS.GXLSPLock").Object 
SaveSecureWorkbookToFile = XLSPadlock.SaveWorkbook(Filename)Exit Function
Err:
SaveSecureWorkbookToFile = ""
End Function 
 

 

You can then call the function:

Sub Test_Save()
 SaveSecureWorkbookToFile ("d:\my documents\my save.xlsc")
End Sub