Unexpected Error while loading protected workbook when opening file via VBA

I am receiving the Error Message: Unexpected error while loading protected workbook: Sorry we couldn’t find r:\Office\3G36T\SystematicRiskManager v1.210.3.154.xlsm. Is it possible that it was moved, renamed or deleted? Please restart the protection program.

When I try to load a compiled save file via VBA.

I have a fairly complicated Excel application (c. 55k lines of code, c.30 worksheets, RTDs, forms and formulas etc). Because of this complexity, I have previously tried to implement saving selected sheets, ranges, cells with XLSPadlock, but it was not useable (18 months ago it crashed everytime so I gave up) and now is not feasible, as software updates may mean saved formulas, cells, ranges, names or even sheets may be moved or removed. For this reason, I am managing all loading and saving trough VBA, with inbuilt code to create my own data export/imports when a new version has been installed, but also saving the compiled file on every close.

On this basis, if the user is opening the same app version as last time, I want to automatically open the last compiled save file, created with the XLS Padlock VBA code:

Set XLSPadlock = Application.COMAddIns(“GXLS.GXLSPLock”).Object
strFilename = blah blah
XLSPadlock.SaveWorkbook strFilename

Which does work, and can be opened manually with the app, so I am quite confident the save file is not corrupted.

My issue, lies in the process of opening the save file via VBA.

I have simple code on open of the application, that confirms they are not using a newer version of the app, and if so the code to open the save file is executed:

Public Sub LoadXLSPadlockSaveFile(FilePath As String)
Dim XLSPadlock As Object
On Error GoTo Err
Set XLSPadlock = Application.COMAddIns(“GXLSForm.GXLSFormula”).Object
XLSPadlock.PLOpenSaveFile (FilePath) '<==Comment 1
ThisWorkbook.Saved = True '<==Comment 2
Application.Quit '<==Comment 3
Err:
End Sub

Comment 1: This line of code works. The application is loaded a second time, and starts to open app, but crashes before any VBA code is triggered (that I can tell)
image

Comment 2: I have added this, to try to force the close of the application that is loaded and trigerring the load of the save file (see Comment 3)
Comment 3: I am closing the first application, that is loaded and trigerring the load of the save file. There doesn’t seem to be any clear details, but I think there is a suggestion that you can’t have 2 instances of the app running in memory, BUT I have tried both with AND wothout calling the application.quit.

I can’t work out if I am doing something stupid, or missing the obvious, but if anyone can help it would be amazing. I hope this makes sense - 3 days into dealing with this means I’m starting to go crazy! Thank you very much in advance.

I just saw this. Try checking the option “Allow loading/saving other workbooks through VBA SetOption helper” and see if that works. Please let us know.

Thanks Steve. Frustratingly, that does not solve the problem, but thanks for the suggestion

Suggest you go to Security, Restrictions tab. Check on the following:

  1. Do you have the “Do not allow other instances of Excel when opening the protected workbook” checked?
  2. Do you have the “Only allow one instance of the protected workbook” checked?

Thanks once again, but they are both unchecked.

Does anyone know if @gdgsupport , @gdgsoft or @gdgdevsupport monitor either the support tickets, emails or these channels anymore? I logged a support ticket for this online over a week ago, and emailed them last week but have had no response. I am locked out of releasing now as I have made significant changes that are reliant on this new approach.

I am also becomming extremely nervous having an application that is entirely reliant on external software that doesn’t have a great turn around time / SLA on support issues

Are you using the Universal EXE format or not? Because the issue seems to be indeed that Excel is unable to locate the workbook file when XLSPadlock.PLOpenSaveFile is used.

I have tried with both the universal, and 64bit versions, and error occurs with both. The save file I am trying to open is saved on the C: drive, but to me it appears it is trying to open a second instance of the .exe from the temp drive/folder that is created when you open the app

Thanks for the question @gdgsupport - are you able to give any advice please? Until I am able to resolve this issue, I am unable to release an urgent and now overdue update for my app.

XLSPadlock.PLOpenSaveFile will launch a new instance of the EXE file, yes. That’s how it is designed. However, we may have identified a problem with it in recent version of XLS Padlock, and our engineer has yet to find a solution for that.

Thank you @gdgsupport for the update.
I upgraded to version 2022.1 for the webupdates functionality, however am willing to lose that temporarily, if reverting to a previous version resolves this issue - can you confirm whether that is the case please and which version I should go back to?
Can you also advise likely timescales for a solution/new release, as my project is now at a standstill until we have a solution. I am happy to take a beta version and help with testing if it will help you? Kindest Regards, Paul

Sure, first, we are trying to reproduce the issue on our own computers in order to debug it.

Happy to email you my XLSPadlock .xplp file if that would help you or provide any other details to help replicate / narrow down the issue. Just let me know anything you need from my side. Thank you

Good Morning @gdgsupport Have you made any progress on this yet please? I logged a support call for this in the beginning of January, which has still had no interaction, and is marked as Low Priority. I appreciateyou have replied in this thread, but your last statement was that you were trying to replicate the issue to find a resolution - have you managed to do this yet please? It really is urgent for us and I am starting to get pressure to look at other solutions away from XLSPadlock, which will probably cause me similar levels of disruption.

Hello @gdgsupport Have you made any progress on this yet please? I logged a support call for this in the beginning of January, which has still had no interaction, and is marked as Low Priority. I appreciateyou have replied in this thread, but your last statement was that you were trying to replicate the issue to find a resolution - have you managed to do this yet please? It really is urgent for us and I am starting to get pressure to look at other solutions away from XLSPadlock, which will probably cause me similar levels of disruption.

@gdgsupport @gdgsoft @gdgdevsupport I am keen to do anything I can to help resolve this. If you are willing to join a zoom meeting, i can share my screen / system and demonstrate the issue. Alternatively, are you aware if this has ever worked? I am willing to drop some newer features and go back to an older version if this resolve the issue, even temporarily. I purchased a new licence which I believe gives me some kind of support? Can you advise how I exercise that please?

Hey @gdgsupport @gdgsoft @gdgdevsupport!

I hope you’re doing well. I am reach out to you again regarding this bug that’s been a problem for me for quite a while. I’ve reported it quite a few of times and I understand you were trying to replicate it, but I haven’t received any updates or feedback about it.
I wanted to request that you prioritize fixing this bug as soon as possible as I’ve been waiting over 6 weeks now. As I’ve explained, it’s causing a lot of problems for me, and I rely on your app for my application and I can’t release until I get a resolution or a work-around.
I’ve tried reaching out to you a few times, but haven’t heard back. I understand you have multiple priorities across all your products, but as I have a live subscription I hope I can get some support on this issue?

Thanks for listening, and I hope to hear back from you soon!

Best, Paul

Our main engineer for XLS Padlock has been out of office for several weeks due to personal reasons. Now he is back but it may take some time in order to absorb all the work that has been accumulated. Sorry for the hassle but we try to do our best.

We also had some problems with the ticket system recently, some responses were not picked from the internal mailbox. Do you think it is possible again to send us back your files?

Thank you for your reply, I am sorry to hear about the situation with your engineer, I hope all is well now. do you have an email address I can attach my file to please, rather than add it here. I have reset the various product ID’s in the compilation file, but I feel it would be safer to email it directly rather than post it here. Many Thanks, Paul

Hi @gdgsupport , can you confirm what I should do with the xplp file you’ve asked for please - which email address can I send it to?