Inserting a Class Module


Select Insert Class Module from the code menu to create a class module called Class1. You need to change the name immediately, because this will be the name of the object that you create, and Class1 is somewhat meaningless because it does not reflect the functionality of that class. You use this name within your code to refer to the object and it will become tedious if you keep referring to Class1.

You change the name in the properties window; class modules only have one property, the name. Select the name field and overtype it with PName . This represents the individual objects within a collection. Double-click the class module within the tree view to display it.




Excel VBA Macro Programming
Excel VBA Macro Programming
ISBN: 0072231440
EAN: 2147483647
Year: 2004
Pages: 141

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net