-
January 19th, 2010, 06:14 PM
#1
Oject orienting
I am going to learn about object oritation in VB, how Object is made in VB anyway ?
Thank you
-
January 20th, 2010, 08:31 AM
#2
Re: Oject orienting
You add a class module to a project which defines properties and methods. The name of the class module gives the name of the object.
If you write a class MyObject.cls you will later in your code do
Dim MyObj As New MyObj. or
Dim MyObj as MyObject
Set MyObj = New MyObject
as you would o with any existing object, too.
For metods you write public subs or functions to the class module.
For a property yo write a pair of Property Get / Propery Let/Set procedures.
That's the basics.
Oh yes: one class module can only describe one type of object.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|