| Name Property |
Description
Used to name a class, module, or project. This property is only available at design time.
Rules at a Glance
Standard VB naming conventions apply.
VBA assigns default names (Project1, Class1, etc.) to classes and projects.
Programming Tips and Gotchas
You can't use the same name for a class and the project within which the class resides.
The Project name for an ActiveX project is used by OLE Automation as the Library name when creating or referring to an object. The object reference takes the form LibraryName.ClassName.
Since you typically refer to a class, form, or module by its name from outside of that object, it's best to replace the default value of the Name property (unless, of course, that's the name you intend to keep) as soon after adding it to your project as possible.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access