After compilation External reference excel file not found

Thanks for your new version of 2024.1
After compilation exe with external reference Excel file giving error.
where as both the file Exe and external reference files are on same location.
As per your instruction using below code:
Public Function PathToCompiledFile(Filename As String)
Dim XLSPadlock As Object
On Error GoTo Err
Set XLSPadlock = Application.COMAddIns(“GXLSForm.GXLSFormula”).Object
PathToCompiledFile = XLSPadlock.PLEvalVar(“XLSPath”) & Filename
Exit Function
PathToCompiledFile = “”
End Function

Dim wk As Workbook
Set wk = Workbooks.Open(PathToCompiledFile(“DB.xlsx”), False, False)
Set Y = wk.Sheets(“Entry”)

Source excel file is working perfectly. after compilation getting error.

Is DB.xlsx a companion file?

Yes This file is companion. This file is in same folder where exe file is present. If you have a proper video how to create and compile file. if I / we miss can correct our process.

Somehow, the solution to the problem was not posted.
The XLSPadlock.PLEvalVar(“XLSPath”) is wrong, it should be XLSPadlock.PLEvalVar(“EXEPath”) since the DB.xlsx file is in the same folder as the EXE file.

Thanks. Now its working.:rose::pray:

1 Like

Now it’s working fine. :rose::pray:
With Regards,