Visual Basic for Applications (VBA) is a subset of the programming language Visual Basic (VB). VBA is specifically designed for ease of use within Microsoft Office applications like Microsoft Excel. A Visual Basic Editor (VBE) is built into each workbook and allows you to write, modify, and save VBA code within a workbook. If you want to view VBA code in Excel 2007, then you must first open the VBE.
Open the workbook in Excel that you would like to view VBA code for. VBA code is workbook specific, meaning it is only attached to one workbook. In order to view the code for a specific workbook, you must have that workbook open.
Click on the "Developer" tab, then click on "View Code."
Click on a module in the left sidebar. This will open the module and display the VBA in a box on the right side of your screen.