Subscript out of range error

I am going to get the path to the final “.exe” file (converted by PadLock) in VBA as follows:

Set XLSPadlock = Application.COMAddIns(“GXLSForm.GXLSFormula”).Object

I am getting “Subscript out of range” error, when I am trying to run the application in Windows Server 2012.
However when running in Windows10 (where the XLS PadLock was installed) no error occured.

Any idea why I am getting the error?

Thank you,
Fanis Assante

Could you post the entire VBA code you’re using to get the path to the EXE?

Here is the entire VBA code:
Public Function PathToExeFile() As String
Dim XLSPadlock As Object
Dim FilePath As String

On Error GoTo PathNotFound

Set XLSPadlock = Application.COMAddIns(“GXLSForm.GXLSFormula”).Object
FilePath = XLSPadlock.PLEvalVar(“EXEPath”)
FilePath = Left(FilePath, Len(FilePath) - 1)
PathToExeFile = FilePath
On Error GoTo 0
Exit Function

PathNotFound:
MsgBox ("Err number: " & Err.Number & vbCrLf & "Err description: " & Err.Description)
PathToExeFile = vbNullString
On Error GoTo 0

End Function

So you are running the EXE only on the Windows Server 2012 machine? What is the Excel version (and bitness if any)?

Hi,
Actually the final file will run on Windows Server 2012 machine.
I am testing the app on 32 bit Windows 10 system (my home PC), where
runs.
My PC has Excel 2010, Version 14.0.4734.1000 (32 bit)
In Windows server 2010 is Excel 2010, Version 14.0.7166.5000 (32-bit)

The “Subscript out of range” error is due to Application.COMAddIns(“GXLSForm.GXLSFormula”).Object. This means that the internal add-in GXLSForm.GXLSFormula was not correctly registered by the EXE or it is somehow disabled. In XLS Padlock, enable Developer Tab in the Advanced Options and rebuild the EXE file. Then on the Windows Server 2012 machine with Excel 2010, run the EXE, and on the Developer tab, choose COM add-ins. Check if the GXLSForm.GXLSFormula is available or not.

Hi,
I tried that, however in final executable the COM add-ins in developer tab does not exists. In contrast in the xlsm file the COM add-ins exists. This apply both in Windows Server 2012 and Windows 10.

Thanks
P.S. This problem is preventing me for buying the software, as I will not bbe able to use it.

Please try to repair your Office installation on WS2012

Hi,
I tried that, however in final executable the COM add-ins in developer tab does not exists. In contrast in the xlsm file the COM add-ins exists. This apply both in Windows Server 2012 and Windows 10.

Thanks
P.S. This problem is preventing me for buying the software, as I will not be able to use it.

Από: gdgsupport
Ημερομηνία: 31 Μαΐου 2016 16:14
Προς: [email protected]
Θέμα: [G.D.G. Software Forum] [XLS Padlock] Subscript out of range error

          gdgsupport Support 
        May 31  
 
  The "Subscript out of range" error is due to Application.COMAddIns("GXLSForm.GXLSFormula").Object. This means that the internal add-in GXLSForm.GXLSFormula was not correctly registered by the EXE or it is somehow disabled. In XLS Padlock, enable Developer Tab in the Advanced Options and rebuild the EXE file. Then on the Windows Server 2012 machine with Excel 2010, run the EXE, and on the Developer tab, choose COM add-ins. Check if the GXLSForm.GXLSFormula is available or not.

Visit Topic or reply to this email to respond

In Reply To
assante
May 30

  Hi, Actually the final file will run on Windows Server 2012 machine. I am testing the app on 32 bit Windows 10 system (my home PC), where runs. My PC has Excel 2010, Version 14.0.4734.1000 (32 bit) In Windows server 2010 is Excel 2010, Version 14.0.7166.5000 (32-bit) 

Visit Topic or reply to this email to respond

To stop receiving notifications for this particular topic, click here. To unsubscribe from these emails, change your user preferences