visual basic how to view code in excel code example Example: how to open vba in excel 'To open the VBA Editor in Excel, the keyboard shortcut is: Alt-F11