473,395 Members | 1,437 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Object if not already created

ae
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.
Nov 22 '05 #1
4 1688
ae <an*******@discussions.microsoft.com> wrote:
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.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 22 '05 #2
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" <an*******@discussions.microsoft.com> wrote in message
news:43**********************************@microsof t.com...
Does anybody know how to create a new object, if it already is not created? I.e. true or false or nothing ?
If myObject = ______ 'here what do i put in the blank?

Then Set myCall = CreateObject("myApplication.Word") 'or whatever

Nov 22 '05 #3
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" <an*******@discussions.microsoft.com> wrote in message
news:43**********************************@microsof t.com...
Does anybody know how to create a new object, if it already is not
created? I.e. true or false or nothing ?

If myObject = ______ 'here what do i put in the blank?

Then Set myCall = CreateObject("myApplication.Word") 'or whatever

Nov 22 '05 #4
ae
hi, Jay. Thanks that did it

it's a

ae
Nov 22 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: lawrence | last post by:
How dangerous or stupid is it for an object to have a reference to the object which contains it? If I have a class called $controllerForAll which has an arrray of all the objects that exist, what...
106
by: A | last post by:
Hi, I have always been taught to use an inialization list for initialising data members of a class. I realize that initialsizing primitives and pointers use an inialization list is exactly the...
28
by: Daniel | last post by:
Hello =) I have an object which contains a method that should execute every x ms. I can use setInterval inside the object construct like this - self.setInterval('ObjectName.methodName()',...
2
by: Richard Trahan | last post by:
In the 1.5 Guide, Chapter 8 (Details of the Object Model), last sentence: "The dennis object does not inherit this new property". I don't understand why this is so. A few pages earlier, it says...
9
by: jon wayne | last post by:
OK! I had this nagging doubt Consider (without worrying abt access specifiers) class Kid : public Parent{...}; Parent::someFunc() { Kid k; }
15
by: Carlos Lozano | last post by:
Hi, What is the right way to create an OCX COM component. The component is already registerred, but can't create an instance. I am using the reference to the interop module created. If I use...
4
by: Luke Matuszewski | last post by:
Here are some questions that i am interested about and wanted to here an explanation/discussion: 1. (general) Is the objectness in JavaScript was supported from the very first version of it (in...
3
by: Dave | last post by:
If I have a name of a User Control in my project, how can I set an Object to that User Control? ie; I have a User Control, called "Accounts" in my project I tried the following code ...
0
by: Dhananjay | last post by:
Hi All, I want to develop one application in vb.net for exchange 2000. I tried to add one contact with the code snippet below. The same logic is there for appointment on Microsoft's site. (I...
4
by: =?Utf-8?B?ZGFuZ2U=?= | last post by:
Hi I want to access a remote object to raise an event. How do I get the reference to the object from the server application? I tried to use a singleton but this does not work. thanks Dan
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.