Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
69 views

Excel VBA Master Keyboard Shortcuts Cheat Sheet - ExcelVbaIsFun

This document provides a comprehensive list of keyboard shortcuts for Excel VBA. It includes shortcuts for navigating and debugging code in the Visual Basic Editor, as well as common shortcuts for actions like cut, copy, paste, print and more.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views

Excel VBA Master Keyboard Shortcuts Cheat Sheet - ExcelVbaIsFun

This document provides a comprehensive list of keyboard shortcuts for Excel VBA. It includes shortcuts for navigating and debugging code in the Visual Basic Editor, as well as common shortcuts for actions like cut, copy, paste, print and more.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Dan Strong's Excel VBA Super Ninja Keyboard

Shortcut Master Cheat Sheet Extravaganza


https://www.excelvbaisfun.com

Super Important Excel VBA Shortcuts


Description Windows Mac
Opt + F11 or Fn +
Open the Visual Basic Editor from Excel Alt + F11
Opt + F11
Step Through/ Into. Very useful for slowly analyzing your code one line at a
time. Be sure to hover your mouse around objects and variables to see their F8 Cmd + Shift + I
values if you're running into issues.
Step Over. Runs highlighted line of code in it's entirety, even if it’s a call to a
Shift + F8 Cmd + Shift + O
Sub or Function that has lots of steps.
Step Out. Runs current Sub/Function until the end and Breaks (pauses) on the
next line of the calling procedure. Useful if one macro called another and you Ctrl + Shift + F8 Cmd + Shift + T
want to escape the 2nd one!
Run To Cursor. Zooms to wherever mouse cursor is at and Breaks execution
Ctrl + F8 Debug Menu
there (pauses).
Run. Doesn't work on most Events that only get triggered by the Event action.
Eg: a Worksheet_SelectionChange() event doesn't trigger with Run or Step F5 F5
Through, only by the selected cell changing on that sheet.
Jump To Selected Procedure (Definition). If you have a function or procedure
called, you can click on the function/procedure name and press this to jump Shift + F2 Cmd + D
there.

Jump to Last Position. Toggles the last few places your cursor was in VBE. Ctrl + Shift + F2 Cmd + E

Jump to Previous Procedure Ctrl + Up Arrow Cmd + Up Arrow


Jump to Next Procedure Ctrl + Down Arrow Cmd + Down Arrow

Indent one or more lines of code. Super handy for keeping code legible,
Tab Tab
especially for the inner parts of If Then/ End If or With/ End With statements.

Outdent (Un-indent) one or more lines of code Shift + Tab Shift + Tab
View Macro (from Excel) Alt + F8 View or Developer Ribbon
Record Macro Button (from Excel) View or Developer Ribbon View or Developer Ribbon
Open Properies Window F4 F6
Open Immediate Window Ctrl + G Ctrl + Cmd + G
Open Project Explorer. Useful if this gets closed for some reason. Ctrl + R Ctrl + Cmd + R
Autocomplete Variable/Sub/Func Name. If you're typing a declared variable,
object, constant, OR function or sub name, you can press this to autocomplete
Ctrl + Space Bar Ctrl + Space Bar
or get suggestions if you have a few items with similar spelling. Much easier
than typing really long names!

Unique, Pretty Cool or Noteworthy


Description Windows Mac
Find Ctrl + F Cmd + F
Find Next F3 Cmd + F4
Find Prev Shift + F3 Cmd + Shift + F4
Replace Ctrl + H Cmd + Shift + H
Cycle Code Windows Ctrl + Tab

Switch Split Windows. You have to use Window->Split first to enter split mode. F6 Shift + F6
Breakpoint. Execution will pause at these points and enter Break Mode until
F9 Cmd + T
you Run or Step Through your code.
Clear All Breakpoints Ctrl + Shift + F9 Debug Menu
New Line Before Current Line Ctrl + N Cmd + N
Redo last action Alt + E + R Edit Menu
Cut Entire Line. NOT Redo last action!! Ctrl+Y is usually Redo command, but Ctrl + Y Cmd + Y
for some reason in VBE, it deletes an entire line of code. BEWARE!

Open Locals Window. You can see all objects and variables active in the
Alt + V + S View Menu
current macro. Only in break mode (while stepping through code).
Open Watch Window. You can track specific variables instead of looking at
EVERYTHING going on in the current macro. Only in break mode (while Alt + V + H View Menu
stepping through code).
Quick Watch. Adds highlighted item to Watch Window. Shift + F9 Cmd + F6
Open Object Browser. You can search for properties and methods of active
items that you have turned on in Tools->References and learn about these F2 Ctrl + Cmd + B
libraries.

Show Call Stack. You have to be in 'Debug' or Break Mode, stepping through
the code. If you are calling macros or functions and you're lost, you can view Ctrl + L Cmd + L
the Call Stack to see which macros are in play and the stack order.

Userforms and Form Shortcuts


Userforms can be run and code can be edited, but the form view won't work on a Mac. Best to edit on Windows and then sent to Mac for testing
Description Windows Mac
View Code. If viewing Userform in form view, jumps back to the code view. F7

View Object. If viewing code of a Userform, jumps back to the form view. Shift + F7
Align Lefts. Select multiple controls with Ctrl+Click or dragging mouse and this
Alt + O + A + L
will align them all to the last selected item
Align Centers. See above Alt + O + A + M
Align Rights. See above Alt + O + A + R
Align Tops. See above Alt + O + A + T
Align Middles. See above Alt + O + A + M
Align Bottoms. See above Alt + O + A + B
Make the Same Width. Select multiple controls with Ctrl+Click or dragging
Alt + O + M + W
mouse
Make the Same Height. See above Alt + O + M + H
Make the Same: Both (Height and Width) Alt + O + M + B
Bring to Front Ctrl + J
Send to Back Ctrl + K
Bring Forward Alt + O + O + F
Send Backward Alt + O + O + W

Pretty Common Application Shortcuts


Description Windows Mac
Cut Ctrl + X Cmd + X
Copy Ctrl + C Cmd + C
Paste Ctrl + V Cmd + V or F4
Print Ctrl + P
Save Ctrl + S Cmd + S
Undo. SEE Redo last action vs Cut Entire Line Ctrl + Z Cmd + Z
Select All Text Ctrl + A Cmd + A
Delete Delete Delete
Delete To Start Of Word Ctrl + Backspace Cmd + Backspace
Delete To End Of Word Ctrl + Delete Cmd + Delete
Beginning Of Line Home Home
Select To Beginning Of Line Shift + Home Shift + Home
End Of Line End End
Select To End Of Line Shift + End Shift + End
Top Of Module Ctrl + Home Cmd + Home
Select To Top Of Module Shift + Page Up Shift + Page Up
End Of Module Ctrl + End Cmd + End
Select To End Of Module Shift + Page Down Shift + Page Down
Page Up Page Up Page Up
Page Down Page Down Page Down
Extend Selection Left 1 Char Shift + Left Arrow Shift + Left Arrow
Left Word Ctrl + Left Arrow Cmd + Left Arrow
Extend Selection Right 1 Char Shift + Right Arrow Shift + Right Arrow
Right Word Ctrl + Right Arrow Cmd + Right Arrow
Extend Selection Up Shift + Up Arrow Shift + Up Arrow
Extend Selection Down Shift + Down Arrow Shift + Down Arrow
New Line After Cursor Enter Enter

Rarely Used or Kind of Boring


Description Windows Mac
Help F1 F1
Focus To Object Box Ctrl + F2 Cmd + F2
Close VBE Alt + F4 Opt + F4
Activate Menu Bar F10
Show Right Click Menu Shift + F10
Import File Ctrl + M Opt + Cmd + I
Export Module Ctrl + E Opt + Cmd + E
Turn On Quick Info. You can also hit space bar in between the parenthesis or
Ctrl + I Cmt + I
after commas)
Turn On Param Info Ctrl + Shift + I Cmd + Shift + P
List Properties/Methods Ctrl + J Cmd + J
List Constants Ctrl + Shift + J Cmd + Shift + J
File Menu Alt + F
Edit Menu Alt + E
View Menu Alt + V
Insert Menu Alt + J
Format Menu Alt + O
Debug Menu Alt + D
Run Menu Alt + R
Tools Menu Alt + T
Add-Ins Menu Alt + A
Window Menu Alt + W
Help Menu Alt + H

You might also like