[AccessD] How to create a form with the VBA Extensibility Library

Jim Dettman jimdettman at verizon.net
Fri Aug 10 09:40:51 CDT 2007


Philippe,

  You don't create it through the VBE, but through Access with the
CreateForm() function and then set the forms HasModule property to True.
Access will then add the class module to the VBA project.

JimD. 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of philippe pons
Sent: Friday, August 10, 2007 8:09 AM
To: accessd at databaseadvisors.com
Subject: [AccessD] How to create a form with the VBA Extensibility Library

 Hi all,

I just discovered the capabilities of this library that allows to
programmaticaly control the VBE.
I can now create a new class module with:
Application.VBE.ActiveVBProject.VBComponents.Add (vbext_ct_ClassModule)

or a standard module using the vbext_ct_StdModule constante.

But I can't find how to create a new Form!
There is a vbext_ct_MSForm constante, but it creates a UserForm, very
similar to the ones used in Excel, not an Acces Form.

Do you know if it is possible, and how to do that?

TIA,

Philippe
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list