Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.basic.visual.misc > #533
| From | ralph <nt_consulting64@yahoo.net> |
|---|---|
| Newsgroups | comp.lang.basic.visual.misc |
| Subject | Re: 3 questions from an new oldbie |
| Date | 2011-11-29 15:03 -0600 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <vphad7dkn6bdua835usah68gl8hsdf9f6v@4ax.com> (permalink) |
| References | <7a6380d8-b02a-4ece-a2fd-f934a00e9145@h3g2000yqa.googlegroups.com> |
On Tue, 29 Nov 2011 12:32:04 -0800 (PST), "John L."
<johnlarew@sbcglobal.net> wrote:
>I am trying to instanciate a Visual Basic Class Module called
>"myClass" in a Word 2003 VB macro. I have tried the following:
>
> dim a As myClass
> Set a = CreateObject("Word.Application.myClass")
>&
> Set a = CreateObject("Project.myClass")
>&
> Set a = CreateObject("Word.myClass")
>
>All failed with the same run-time error (429 : ActiveX component can't
>create object). What is the correct invocation?
>
>Is the object saved in the document once created, or destroyed once
>the variable is out of scope?
>
>I also envison using the GetObject() method if the class object is
>created in the document. How do I trap an error returned if GetObject
>doesn't find the object?
>
>Thanks in advance for any help you may be able to provide.
From your wording and the examples given it isn't clear to me where
"myClass" resides. However, assuming myClass is published through an
ActiveX component...
The CreateObject function takes as its argument an AppID or ProgID
which must be registered in the Registry.
Look under
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AppID\{AppID_value}
to see if it is registered.
hth
-ralph
Back to comp.lang.basic.visual.misc | Previous | Next — Previous in thread | Next in thread | Find similar
3 questions from an new oldbie "John L." <johnlarew@sbcglobal.net> - 2011-11-29 12:32 -0800 Re: 3 questions from an new oldbie ralph <nt_consulting64@yahoo.net> - 2011-11-29 15:03 -0600 Re: 3 questions from an new oldbie Deanna Earley <dee.earley@icode.co.uk> - 2011-11-30 09:23 +0000
csiph-web