Macro Characters Mapped to ASCII Equivalents Reference (VBA/ActiveX)

Use the ASCII equivalent for these special characters when creating the string for the Macro property.

The following table provides a synopsis of special characters used in menu macros and their equivalent ASCII numbers as they are used in VB and VBA.

Special characters used in menu and toolbar macros
Character ASCII Equivalent Description
; chr(59) Issues Enter
^M chr(13) Issues Enter
^| chr(94) + chr(124) Issues Tab
Spacebar chr(32) Enters a space; blank space between command sequences in a menu item is equivalent to pressing the Spacebar
\ chr(92) Pauses for user input
_ chr(95) Translates AutoCAD commands and keywords that follow
+ chr(43) Continues menu macro to the next line (if last character)
=* chr(61) + chr(42) Displays the current top-level image, pull-down, or shortcut menu
*^C^C chr(42) + chr(3) + chr(3) Prefix for a repeating item
$ chr(36) Loads a menu section or introduces a conditional DIESEL macro expression
^B chr(2) Toggles Snap on or off (Ctrl+B)
^C chr(3) Cancels command (Ctrl+C)
Esc chr(3) Cancels command (Esc)
^D chr(4) Toggles Coords on or off (Ctrl+D)
^E chr(5) Sets the next isometric plane (Ctrl+E)
^G chr(7) Toggles Grid on or off (Ctrl+G)
^H chr(8) Issues backspace
^O chr(15) Toggles Ortho on or off (Ctrl+O)
^P chr(16) Toggles MENUECHO on or off
^Q chr(17) Echoes all prompts, status listings, and input to the printer (Ctrl+Q)
^T chr(20) Toggles Tablet on or off (Ctrl+T)
^V chr(22) Changes current viewport (Ctrl+V)
^Z chr(26) Null character that suppresses the automatic addition of Spacebar at the end of a menu item