I am having trouble assigning a value to constant variant declaration. So the declaration is this
Option Explicit
public const Abc as variant = ?
Abc is a Microfocus rumba object which gets initiated when the workbook is open, something like this
sub workbook_open()
Set Abc= session.GetRDEObject()
End sub
But I cannot use this to assign it to the const variable, it says "Circular dependencies". The reason I am wanting to assign value is to ensure the object Abc is alive even after user executes End statement. Is there a way I can do this?.
I have tried creating a separate function and adding its return value to the Abc, but it does not work.
A constant is exactly that, so try something like this: