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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Classes in VBA?? 1

Status
Not open for further replies.

JoeSmoe55

Programmer
Aug 1, 2005
38
US
Please forgive me for my ignorance and inexperience but I was wondering if it is possible to write classes in VBA and if so, do you have a good link to a site where I might learn. Also, I would like tips on how to search for this info without bugging you guys with silly questions. I alway resort to google searches. Thanks for your patience and grace.

Joe
 
Yes it is possible to write classes in VBA.

Not considered to be an "Object Oriented Language", in the full sense, it does though, come very close.
I think the only attribute it lacks to qualify is, "inheritance". Which I believe is more of a convenience quality in regards to development, than functional.

I don't know of any sites in particular, but I anticipate there's many, for it's not uncommon at all.

I wrote a couple of very simple ones myself, just to get the gist of it. So again, yes, it's very possible.

But just for the record, I understand that any class one writes, can be written as a procedure or function. So I have yet to find a real need for it. I think it helps a great deal when developing in teams. And offers a very familiar interface as you can access methods and properties of your class, the same way you do in VBA.

Prepare yourself, there's a bit of a learning curve....


Good luck!

 
It's not OOP but you can get some good use out of it.

For example, I have classes written to open a recordset and then load the values into properites. I can then manipulate these properties until i'm ready to call a functions of the class that updates the actual record. This is great for disconnected forms.

Mark P.
Providing Low Cost Powerful Point of Sale Solutions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top