I saw a work around in another post, which I tried to replicate.
However, I’m getting a further error. Runtime error 424 Object required. The program gets crashes on the bolded line. I definitely have the COM reference in VBA ticked under tools for the GXLSForm Library.
Public Function PathToFile(Filename As String)
Dim XLSPadlock As Object
Set XLSPadlock = Application.COMAddIns(“GXLSForm.GXLSFormula”).Object
PathToFile = XLSPadlock.PLEvalVar(“EXEPath”) & Filename
I tried replacing the bolded line with the following:
Set XLSPadlock = Application.COMAddIns.Item(“GXLSForm.GXLSFormula”).Object
Same problem. I also iterated through the COMAddIns collection to see if I had the library in the COMS list, and it does e.g.
a = Application.COMAddIns.Count
For i = 1 To a
b = Application.COMAddIns(i).progID
Cells(1, 1) = b
When I use a breakpoint, I can see the value of b and I do see that GXLSForm.GXLSFormula is in the list.
Please let me know if anyone has any clue what is wrong. I’ve setup a basic program with just this code. Im happy to email the two Excel files I’m testing on, its only about 25KB.