Creating Custom Objects for Web PagesThis content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
There are two ways to create objects for Web pages that are similar to custom objects created in Microsoft® Visual Basic® for Applications (VBA): by creating scriptlets, and by using Microsoft® Internet Explorer version 5 and later behaviors.
In This Section
- Dynamic HTML (DHTML) Scriptlets
- Create custom reusable objects for Web pages by using DHTML scriptlets. DHTML scriptlets are Web pages in which script procedures have been written according to certain conventions so that these procedures behave similar to methods and properties of the scriptlet.
- DHTML Behaviors
- DHTML behaviors are lightweight, reusable components that encapsulate specific functionality or behavior on a page.
- Custom Classes and Objects
- If you have never used class modules to build custom objects before, this section covers the concepts that you must understand to design, build, and use custom objects with their own methods and properties.
- Why Build Your Own Objects?
- Build entire custom object models that involve complex code behind the scenes, but that present a relatively simple and intuitive object syntax to the programmer.
- Basic Class Concepts
- Become familiar with using class modules to build custom objects, and learn the basics of adding a class to your project, creating an instance of a class in memory, and constructing properties and methods.
- Creating Property Procedures
- Public module-level variables in a class module function as properties of an object.
- Creating Events and Event Procedures
- Take advantage of simple to create events procedures and use ThisDocument, ThisWorkbook, or SheetN objects.
- Extending Objects Through Interfaces
- Suppose that in the process of designing your application, you decide that you want to create several objects that are closely related, and, in fact, require at least some of the same properties and methods.
- Designing Object Models
- When you design an object model, you are taking abstract processes and imposing concrete relationships upon them.