Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA to VB6

Status
Not open for further replies.

Creigbm

Mechanical
Aug 1, 2003
161
If a form or module is created in VBA, can it be exported and then imported into a VB6 project?

Thanks.
 
Replies continue below

Recommended for you

A form or module is not created in VBA. It is created in the Application which uses VBA as its underlying engine. Forms are created in Word, Excel, Access, and VB6, all of which use VBA as their underlying engine.

So the question is how to move forms created in Access to forms in VB6, or vice versa, or forms from Excell into Access or VB6.

The answer is not very easily. The standard set of controls that Access provides (textbox, combobox, etc) is not the same as the standard set of controls that VB6 provides, meaning that properties and events may not match up. It's conceivable that you could write a program to analyze a form designed in access, and try to recreate that design in VB6, but it would be an arduous process, since not all of the control will matchup. For example, VB6 does not have a subform control like Access does. If you don't have too many forms, then manual may be the best option. You can then cut and paste the actual code behind the forms, making sure that relavent event name match up, and you certainly can cut and paste entire standard code modules from one to the other.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor