1. Launch Excel and go through the typical setup procedure for VBA program development:
display the Developer tab
set Macro security to enable all macros
set Require Variable Declaration in the Visual Basic Editor
Launch the VBE ( Alt-F11) and insert a module into the project associated with your Excel workbook.
Fig: 1