Object if not already created

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can someone help me out? I am trying to create, it already does not exist a new object. I have tried the following without success, and I get an "out of stack" error as well as not valid

If myObject = False Then Set rfl = CreateObject("ReflectionIBM.Session"

I also tried

If rfl = Nothing Then Set rfl = CreateObject("ReflectionIBM.Session"

Thanks.
 
ae said:
Can someone help me out? I am trying to create, it already does not
exist a new object. I have tried the following without success, and I
get an "out of stack" error as well as not valid.

If myObject = False Then Set rfl = CreateObject("ReflectionIBM.Session")

I also tried:

If rfl = Nothing Then Set rfl = CreateObject("ReflectionIBM.Session")

You haven't posted *nearly* enough context here. A complete program
which demonstrates the problem would be very helpful. See
http://www.pobox.com/~skeet/csharp/complete.html - feel free to read
"C#" as "VB.NET" everywhere.
 
Please post VB related questions to Microsoft.Public.Vb.Syntax, this NG is
for DOTNET general questions.
As for your Q.

If myObject Is Nothing Then ....

Willy.
 
x (or is it ae)?

Is this a VB.NET question or a VB6 (VBScript) question? Set suggests a VB6
question, in either case, have you tried something like (VB.NET syntax):

If myObject Is Nothing Then
myObject = CreateObject("myApplication.Word")
End If

Is myObject verses myCall a typo or do you actually have two variables?

Hope this helps
Jay


x said:
Does anybody know how to create a new object, if it already is not
created? I.e. true or false or nothing ?
 
Back
Top