Problems with GXLS.GXLSPLock

Hi - Trying to set options around saving/loading files and need to use the GXLS.GXLSPLock, but getting an error whenever i reference it.

' This works
Dim a As Object
Set a = Application.COMAddIns("GXLSForm.GXLSFormula").Object

' this does not work
Dim b As Object
Set b = Application.COMAddIns("GXLS.GXLSPLock").Object

The second set of statements fails with “subscript out of range”.

Using 2024.1, 64bit. Have tried re-installing. Can only see two com addins in the list “GXLSFormula” and “XLS Padlock” - not sure if there is supposed to be others?

Any pointers/help appreciated.

Regards, D

Ok, realised that GXLSPLock is not available until it the sheet is compiled. Also explains why the on error resume next is through the code snippets (which ignores these errors during dev in standard mode). All makes sense when you think about it!

1 Like