I have copied the functions from the user guide to save a secure work, but it won’t create the .xlsc or .dat file. It doesn’t error out, either. I added a msgbox to let me know if an jumps down to the err: label.
I’m using the pathtofile function as well to create the full filename string. I’ve moved the executible to c:\temp folder and ran it from there, and nothing.
What am I missing?
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)
MsgBox "inside save"
Exit Function
Err:
MsgBox "error in savesecure"
SaveSecureWorkbookToFile = ""
End Function
Sub Savesheet()
’
’ Savesheet Macro
’ Save the spreadsheet in xlsc formt
’
'
Dim pathandname As String
Dim defaultname As String
defaultname = “testsave.xlsc”
pathandname = pathtofile(defaultname)
MsgBox pathandname
SaveSecureWorkbookToFile (pathandname)
MsgBox “after save secure call”
End Sub
I’m using the pathtofile function as well to create the full filename string. I’ve moved the executible to c:\temp folder and ran it from there, and nothing.
What am I missing?
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)
MsgBox "inside save"
Exit Function
Err:
MsgBox "error in savesecure"
SaveSecureWorkbookToFile = ""
End Function
Sub Savesheet()
’
’ Savesheet Macro
’ Save the spreadsheet in xlsc formt
’
'
Dim pathandname As String
Dim defaultname As String
defaultname = “testsave.xlsc”
pathandname = pathtofile(defaultname)
MsgBox pathandname
SaveSecureWorkbookToFile (pathandname)
MsgBox “after save secure call”
End Sub


