Hi @gdgsupport and all,
I’m trying to get the companion files example from the help file to work, so I made a super simple workbook, named it “Test File.xlsx” and saved it in the EXE’s same directory.
Tried to open it with code from the pdf help file (please note that I renamed the file without a space and retried the entire experiment below as well):
wbPath = PathToCompiledFile(“TestFile.xlsx”)
Dim wk As Workbook
Set wk = Workbooks.Open(wbPath, False, False)
MsgBox wk.Sheets(1).Cells(1, 1).Value
wk.Close
but it gives me this error:
The file is not actually corrupt. I know the file exists in the virtual drive exactly as spelled above, because I iterated through the drive. When the file does not exist in the virtual drive, a separate error msg appears about the file not existing, so it’s something about being able to open the file and read it.
Please advise if there’s updated code (or settings) or if this is just an XLSP issue to be resolved.
Thanks for being awesome!
Dan