Purpose: get current workbook save file path
This lets you retrieve the path to the workbook save file that has been selected by the user at startup (if any).
Insert the following code:
Public Function GetSecureWorkbookFilename()
Dim XLSPadlock As Object
On Error GoTo Err
Set XLSPadlock = Application.COMAddIns("GXLS.GXLSPLock").Object
GetSecureWorkbookFilename = XLSPadlock.GetSaveFilename()
GetSecureWorkbookFilename = ""
The previous code can be tested with:
MyFile = GetSecureWorkbookFilename
Copyright © 2022 G.D.G. Software