Cheatography For VBA
Cheatography For VBA
Ctrl+A Select all text in the current F1 Stop code execution Ctrl+F9 Moves the current line of
module. F2 Display Object Browser execution to the selection for the
Ctrl+C Copies the selection to the next executed command.
F3 Find next
clipboard. Ctrl+F10 Activate the Menu bar.
F4 Display Properties Window
Ctrl+E Displays the (File > Export File)
F5 Run currently selected code
dialog box. Other + Function
F6 Switch between split code windows
Ctrl+F Displays the (Edit > Find) dialog Alt+F4 Closes the Visual Basic Editor
F7 Displays code window window and returns to the
box.
F8 Step through code line by line application.
Ctrl+G Displays the (View > Immediate
window) window. F9 Insert or toggle break point Alt+F5 Resume execution though the
F10 Toggles activation of menu bar error handler / run error handler.
Ctrl+H Displays the (Edit > Replace)
dialog box. (Find/Replace) Alt+F8 Steps into the error handler or
Shift + Function returns the error to the calling
Ctrl+I Turn on quick information (Edit >
procedure. Does not affect the
Quick Info). Shift+F2 Move to definition of procedure
setting for error trapping on the
Ctrl+J Displays a drop-down of available Shift+F3 Find previous occurrence of
General tab of the Options
properties (Edit > List Propertie‐ last search
dialog box.
s/Methods). Shift+F4 Repeats last find (Find next)
Alt+F11 Toggles between the Visual
Ctrl+L Show the call stack (View > Call Shift+F7 Toggle between userform and Basic Editor and the application.
Stack). userform's code
Ctrl+ Moves back to the previous
Ctrl+M Displays the (File > Import File) Shift+F8 Step through code, and Shift+F2 position (View > Last Position).
dialog box. execute entire called
Ctrl+ Step out of code.
Ctrl+N Inserts a new line and positions procedure
Shift+F8
the cursor at the start of the line. Shift+F9 Activate watch window
Ctrl+ Clear all breakpoints from the
Pressing Enter will maintain the
Shift+F10 Display shortcut for menu for Shift+F9 active project.
same indentation.
selected item
Ctrl+P Displays the (File > Print) dialog
box. Ctrl + Function
Ctrl+R Displays the (View > Project
Ctrl+F2 Activates the Object Box in the
Explorer) window.
top left corner of the Code
Ctrl+S Saves (File > Save). window.
Ctrl+T Displays the Components dialog Ctrl+F4 Closes the active MDI child
box listing all the available window.
components. This is a Visual
Ctrl+F5 Runs the error handler code or
Basic 6.0 dialog box.
returns the error to the calling
Ctrl+V Pastes the current clipboard entry. procedure. Does not affect the
Ctrl+X Cuts the selection to the clipboard. setting for error trapping on the
General tab.
Ctrl+Y Cuts the entire line to the
clipboard. Ctrl+F6 Moves to the next open window.
This is exactly the same as (Ctrl
Ctrl+Z Undo the last action (Edit > Undo).
+ Tab).
Ctrl+F8 Run to the cursor.