Getting the Excel Workbook Path


In an XLS Padlock EXE, is is possible to get the path to the Workbook in VBA?
“Workbook.Path” gets the temporary path that the EXE runs in. Is there any way to get the real path that the workbook is in?

Thanks for your reply.

Here is an extract from the guide:

Example 2: you want to access external files with VBA code. External files must be in the same folder as the
EXE file. You can use this code:

Public Function PathToFile(Filename As String) 
Set XLSPadlock = Application.COMAddIns("GXLSForm.GXLSFormula").Object 
PathToFile = XLSPadlock.PLEvalVar("EXEPath") & Filename 
End Function

If you pass Myfile.ext to this function, it returns the full path to the file, provided that the file is in the same
folder as the EXE file.

So in your case, just pass an empty value to the function.