need help with CreateObject 
Author Message
 need help with CreateObject

(warning: new to this, so I may have incorrect terminology)

Hello-

I have a VB COM component (server) that I want to create an instance of in
VB- using code, not including it as a "reference".  So, I'm trying to to use
VBScript CreateObject to do so- is this possible?

So, I have something like this:

With ScriptControl1
        Dim MyObject As Object
        AllowUI = True
        Set MyObject = CreateObject("clsMultiDropServer")
        IsObject (MyObject)
End With

It doesn't work.  Anyone have any tips for what I am doing wrong?  I'm not
even sure I'm going about it in the correct way.

Thanks, Al



Mon, 01 Jul 2002 03:00:00 GMT  
 need help with CreateObject
the rule to make the string (progid) for the createobject if the component
is in VB is ProjectName.ClassName
it seems to me you put only the classname
HTH,sabba
--
Enrico Sabbadin

http://sabbadin.tripod.com
MTS FAQ: http://sabbadin.tripod.com/mts_faq.htm


Quote:
> (warning: new to this, so I may have incorrect terminology)

> Hello-

> I have a VB COM component (server) that I want to create an instance of in
> VB- using code, not including it as a "reference".  So, I'm trying to to
use
> VBScript CreateObject to do so- is this possible?

> So, I have something like this:

> With ScriptControl1
>         Dim MyObject As Object
>         AllowUI = True
>         Set MyObject = CreateObject("clsMultiDropServer")
>         IsObject (MyObject)
> End With

> It doesn't work.  Anyone have any tips for what I am doing wrong?  I'm not
> even sure I'm going about it in the correct way.

> Thanks, Al



Mon, 01 Jul 2002 03:00:00 GMT  
 need help with CreateObject
sabba-

I guess I need some hand holding.

clsMultiDropServer I *think* is the name of the class, how do I figure out
the name of the object?  I have no idea what that is.  How would I figure
that out?

Thanks


Quote:
> the rule to make the string (progid) for the createobject if the component
> is in VB is ProjectName.ClassName
> it seems to me you put only the classname
> HTH,sabba
> --
> Enrico Sabbadin

> http://sabbadin.tripod.com
> MTS FAQ: http://sabbadin.tripod.com/mts_faq.htm



> > (warning: new to this, so I may have incorrect terminology)

> > Hello-

> > I have a VB COM component (server) that I want to create an instance of
in
> > VB- using code, not including it as a "reference".  So, I'm trying to to
> use
> > VBScript CreateObject to do so- is this possible?

> > So, I have something like this:

> > With ScriptControl1
> >         Dim MyObject As Object
> >         AllowUI = True
> >         Set MyObject = CreateObject("clsMultiDropServer")
> >         IsObject (MyObject)
> > End With

> > It doesn't work.  Anyone have any tips for what I am doing wrong?  I'm
not
> > even sure I'm going about it in the correct way.

> > Thanks, Al



Mon, 01 Jul 2002 03:00:00 GMT  
 need help with CreateObject
Are you trying to create this object in a web enviroment, a client/server
enviroment, or server enviroment only?

The fully qualified name would be the name of the DLL (not including
extension) and the name of the class, e.g. "MyDllname.clsMultiDropServer".
If you are in a VB client/server environment, you do not need to use the
Scripting object to use CreateObject, as it is a regular method of VB.

If you are trying to create this object in a client, and the object exists
on a remote (server) machine, you will need to register the component's type
library on the client machine and check it's DCOM properties with
dcomcnfig.exe, a utility that allows you to specify the remote location of
the actual component.

HTH,
Brian A. Manlove
Magenic Technologies Int'l.

Quote:

> (warning: new to this, so I may have incorrect terminology)

> Hello-

> I have a VB COM component (server) that I want to create an instance of in
> VB- using code, not including it as a "reference".  So, I'm trying to to
use
> VBScript CreateObject to do so- is this possible?

> So, I have something like this:

> With ScriptControl1
>         Dim MyObject As Object
>         AllowUI = True
>         Set MyObject = CreateObject("clsMultiDropServer")
>         IsObject (MyObject)
> End With

> It doesn't work.  Anyone have any tips for what I am doing wrong?  I'm not
> even sure I'm going about it in the correct way.

> Thanks, Al



Mon, 01 Jul 2002 03:00:00 GMT  
 need help with CreateObject
Typically, in VB, the full ProgID (programmatic ID) is formed like
"ProjectName.ClassName"

So, a fresh, out-of-the-add-project-wizard form ProgID would look like
"Project1.Class1"

Good luck,

Eric Rudisill


Quote:
> sabba-

> I guess I need some hand holding.

> clsMultiDropServer I *think* is the name of the class, how do I figure out
> the name of the object?  I have no idea what that is.  How would I figure
> that out?

> Thanks



> > the rule to make the string (progid) for the createobject if the
component
> > is in VB is ProjectName.ClassName
> > it seems to me you put only the classname
> > HTH,sabba
> > --
> > Enrico Sabbadin

> > http://sabbadin.tripod.com
> > MTS FAQ: http://sabbadin.tripod.com/mts_faq.htm



> > > (warning: new to this, so I may have incorrect terminology)

> > > Hello-

> > > I have a VB COM component (server) that I want to create an instance
of
> in
> > > VB- using code, not including it as a "reference".  So, I'm trying to
to
> > use
> > > VBScript CreateObject to do so- is this possible?

> > > So, I have something like this:

> > > With ScriptControl1
> > >         Dim MyObject As Object
> > >         AllowUI = True
> > >         Set MyObject = CreateObject("clsMultiDropServer")
> > >         IsObject (MyObject)
> > > End With

> > > It doesn't work.  Anyone have any tips for what I am doing wrong?  I'm
> not
> > > even sure I'm going about it in the correct way.

> > > Thanks, Al



Mon, 01 Jul 2002 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. I need help with CreateObject

2. I need help with CreateObject

3. Need help using wordpad as createobject in VB

4. Help with VBA needed (CreateObject function)

5. new and createobject need help

6. Diff between WScript.CreateObject & CreateObject

7. The difference between CreateObject and Server.CreateObject

8. CreateObject vs Server.CreateObject

9. CreateObject vs. Server.CreateObject

10. Server.CreateObject() or CreateObject()

11. createobject(progid,server) vs. createobject(progid)+registry

12. I Need To CreateObject In another Machine

 

 
Powered by phpBB® Forum Software