Link to home
Start Free TrialLog in
Avatar of Patrick O'Dea
Patrick O'DeaFlag for Ireland

asked on

Quickie! Is Microsoft Access VBA an Object Orientated Programming

I have never properly  understood what OOP is.

I can and do program VBA in Access.

Is this OOP??
SOLUTION
Avatar of Kyle Abrahams, PMP
Kyle Abrahams, PMP
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Patrick O'Dea

ASKER

Thank folks!

I guess I don't know OOP - better change my CV!
Like Jim said ... it's not a true OOP based on a strict definition.
However ... it's close enough for me :-)

mx
Specifically at it's simplest, VBA lacks full inheritance.  You can't build a class on top of a class and extend it.

That's what an OOP language allows.  A simple example; a text control.    sub-types might be text, numeric, and date/time.  

In an oop language, I would have a base class of "text box" and then build three new classes off that.  Within my program, I would create instances using the sub-types.   If I made a change in the base class later (say to select the contents on gotfocus), that would be reflected in all the sub classes (You inherit all properties, events, and methods of your base class). This gives you a class hierarchy (think of a family tree).

Nothing like that exits in VBA.   I can make a copy of an object and modify that, but it's unrelated to the original.

There's a little more to it then that, but that's it in a nutshell.

Jim.