Problems to create a classmodule from an own addin 
Author Message
 Problems to create a classmodule from an own addin

Hi all,

I've create a little piece of code that create a classmodule.
The next step I want to do is to implement this into an Add-In.

I used the following code:

    'Application.DoCmd.Echo False
    RunCommand acCmdNewObjectClassModule

    strName = CurrentObjectName
    Application.DoCmd.Save acModule, strName
    Application.DoCmd.Close acModule, strName
    Application.DoCmd.Rename m_strClassname, acModule, strName
    Application.DoCmd.OpenModule m_strClassname
    Set modNewClass = Modules(m_strClassname)

The problem is the Line
        RunCommand acCmdNewObjectClassModule

If this is execute from an AddIn the is an error.
So I searched the Online-Help and MSDN and I find that this command
isn't aviable in an AddIn.

Do someone know another command to create an classmodule ?

thx for help

Joachim



Sun, 04 Apr 2004 17:17:20 GMT  
 Problems to create a classmodule from an own addin
i think you can find solution on www.mvps.org/access

--
Alex.Dybenko.com


Quote:
> Hi all,

> I've create a little piece of code that create a classmodule.
> The next step I want to do is to implement this into an Add-In.

> I used the following code:

>     'Application.DoCmd.Echo False
>     RunCommand acCmdNewObjectClassModule

>     strName = CurrentObjectName
>     Application.DoCmd.Save acModule, strName
>     Application.DoCmd.Close acModule, strName
>     Application.DoCmd.Rename m_strClassname, acModule, strName
>     Application.DoCmd.OpenModule m_strClassname
>     Set modNewClass = Modules(m_strClassname)

> The problem is the Line
> RunCommand acCmdNewObjectClassModule

> If this is execute from an AddIn the is an error.
> So I searched the Online-Help and MSDN and I find that this command
> isn't aviable in an AddIn.

> Do someone know another command to create an classmodule ?

> thx for help

> Joachim



Mon, 05 Apr 2004 04:18:05 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Is it possible to create a classmodule from scratch with VBA

2. Help!!!!!!!!! - My own addin (Plugins)

3. Newbie: Problem with creating his own controls

4. Problems with creating my own progress bar

5. Custom Addin calling another custom Addin

6. How do I get a VB5 AddIn DLL in the Addin Manager

7. Help: Need advise on turning VB Addin into Excel Addin

8. Error on creating new module from addin

9. Eventhandler for an addin created in vb.net for Outlook 2002 not working

10. How to create a addin for the delivery of messages

11. Trying to create an addin to classify outgoing mail

12. How to create a Com AddIn for Outlook 2000 with VB6 standard

 

 
Powered by phpBB® Forum Software