Hello!
When I try to protect a sub then I get the error that res is a variable without definition.
Sub abc()
Dim res As String
res = CallXLSPadlockVBA(“abc”, “”)
End Sub
'This function lets you call VBA macros compiled with XLS Padlock
Public Function CallXLSPadlockVBA(ID As String, Param1)
Dim XLSPadlock As Object
Set XLSPadlock = Application.COMAddIns(“GXLSForm.GXLSFormula”).Object
CallXLSPadlockVBA = XLSPadlock.PLEvalVBA(ID, Param1)
Set XLSPadlock = Nothing
End Function
What can I do?
Thank you very much!