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

Can I create a class?

Status
Not open for further replies.

xtraterrestrial

Programmer
Sep 23, 2003
38
0
0
CA
I am programming a form in Outlook.

I would like to create a Class which basically stores a bunch of information, is it possible to do so in VBA?

If it is can someone show me the syntax or give me an example of one ? Thanks
 
Class Statement
Declares the name of a class, as well as a definition of the variables, properties, and methods that comprise the class.

Class name
statements
End Class

Arguments
name

Required. Name of the Class; follows standard variable naming conventions.

statements

Required. One or more statements that define the variables, properties, and methods of the Class.

Remarks
Within a Class block, members are declared as either Private or Public using the appropriate declaration statements. Anything declared as Private is visible only within the Class block. Anything declared as Public is visible within the Class block, as well as by code outside the Class block. Anything not explicitly declared as either Private or Public is Public by default. Procedures (either Sub or Function) declared Public within the class block become methods of the class. Public variables serve as properties of the class, as do properties explicitly declared using Property Get, Property Let, and Property Set. Default properties and methods for the class are specified in their declarations using the Default keyword. See the individual declaration statement topics for information on how this keyword is used.

Requirements
Version 5



MrGreed

"did you just say Minkey?, yes that's what I said."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top