Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

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

Using VBA with VB

Status
Not open for further replies.

BeejCyr

MIS
Aug 1, 2002
49
US
I am writting a rather large application and I am finding it would be helpful to allow certain users to customize it with VBA. I have seen many programs (CorelDraw, Macola Accounting, Word, Excell, and so on) that allow the end user to give the program additional functionality by writting VBA routines that hook to the main app. How can you do this? How do you "attach VBA to a VB6 application?
 
Hi
I'm not sure if this is what you're after, but you can make an ActiveX dll project using VB6. When you compile this and make it into a dll file, the user can add a reference to it and use its methods and so on from VBA (or VB6 of course). But they would need a host application to run the VBA.

Does this help?

Mark
 
Not quite what I am looking for. As an example, lets say in my application, I have an inventory entry screen, I would like to give the end user the option of adding in code in VBA what will fire on the Lose Focus event. Much in the same way Excel gives the enduser the option of adding additional functionality by letting him/her write code that fires after they edit a cell.
 

Yes you can do what you are wanting to do but I would suggest searcing MS for specific info. If you are a full MSDN subscriber you may find your answer on the VBA SDK. Be forewarned that you will have a lot of programming to do to expose the methods and properties to allow a user to customize your program.

GOOD LUCK!!!
 
Thanks vb5prgrmr & Custom24. I see 8.95 looks pretty cheap for the SDK, they must be planning on sticking it to me on the distribution end. hehe.

The VBScript was not even an option I had considered. Thanks for turning me on to it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top