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

Classes in full

Status
Not open for further replies.

AndyGLondon

Instructor
Feb 7, 2010
4
GB
Hello.

Can anyone point to, or supply, a FULL tutorial on creating classes (I'm using Excel, but this shouldn't matter).

I can create a class, define and use it's methods and properties. I want to know about creating a class hierarchy, defining class events, and more. I'm sure there is more to this subject than I've managed to discover on the internet.

Thanks, Andy.
 
That is hard to answer without knowing where you are already at.

Googling "VBA + using Classes" gets a whole bunch of sites. True, it is a bit of a mess trying to pull everything together, but a lot of information is there.

So I do not know of a "FULL" tutorial, but there is lots out there.

Gerry
 
Understand also that VBA is an Object Based language (in contrast to Object Oriented), so a full tutorial will expose many shortcomings in VBA. Specifically to your question, VBA cannot create class hierarchies as it does not support inheritance.
 
Thank you.

I'm studying Excel VBA, advanced topics at the moment. I was aware that VBA is not fully object-oriented.

Could you describe in what sense VBA doesn't support class hierarchies? I've created a cEmployee class and a cCustomer class as a member of cEmployee; so I am able to use a statement like: anEmployee.Customer.Name = "Ted".

I'm I right to say that this is not a "true" hierarchy because a customer can be instantiated without the need for an employee? Thanks, Andy.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top