Get the Name of an Object
When coding you often use the names of different objects: filenames, fields, ranges, etcetera. If you know a name you can simply type it, but selecting it instead does have its advantages:
- Save time typing - in case of long names;/li>
- Prevent bugs caused by typos.
The Name menu is integrated with several Code VBA tools:
- Directly accessible from the Code VBA toolbar Name menu;
- String expression assignment - selecting the Name submenu an item inserts the selected as a String literal;
- Constant Builder - clicking the Value button opens the name menu.
String expression assignment
IntelliSense for String assignment pops up a continuations menu with under Name ways to get appropriate values. Other options, here in the context of Excel, are:
- Get a file full name using the file selection dialog;
- The full name of the current document - often names are related to the current location of your application file;
- The names of the current module and procedure - error handling;
- The name of one of the Sheets and Named Ranges in the current workbook;
- The names of the variables in the current procedure, useful for Debug.Print;
- See also MS Access objects names

Insert name of MS Access objects Table, Query, Form or Report and their Fields or Controls
The approach works for MS Access objects Table, Query, Form and Report and their Fields or Controls. These can be reached either via the Name submenu or via the Access menu, e.g. image below.
The inserter tries to determine whether the inserted string needs to surrounded by quotes or square brackets: E.g. after Access table- or form names followed by Dash (!) it will surround the inserted field or control name with square brackets if the name contains a space.