M
Maury Markowitz
I'm trying to create a singleton of an COM object. This shouldn't be
difficult...
Private appxhandle As Object
Public Function appx() As Object
If IsNull(appxhandle) Then
Set appxhandle = CreateObject("MyApp", "myMachine")
End If
appx = apphandle
End Function
The inner part of the IF statement never gets called -- the variable is
never null. It does not work if I use IsMissing either, nor appxhandle =
Nothing (illegal for some reason) or IsObject etc.
Anyone know the magic incantation?
Maury
difficult...
Private appxhandle As Object
Public Function appx() As Object
If IsNull(appxhandle) Then
Set appxhandle = CreateObject("MyApp", "myMachine")
End If
appx = apphandle
End Function
The inner part of the IF statement never gets called -- the variable is
never null. It does not work if I use IsMissing either, nor appxhandle =
Nothing (illegal for some reason) or IsObject etc.
Anyone know the magic incantation?
Maury