Saturday, September 22, 2012

How to Edit VBA in Excel 2007


1. Start Microsoft Excel 2007, select the 'Developer' tab and click 'Record Macro.' Leave everything as default and click 'OK.' Select 'A1' and type 'I'm going to edit VBA in Excel 2007' and press 'Enter.'
2. Click 'Stop Recording' in the 'Code' pane. Click 'Macros,' select 'Macro1' and click 'Step Into.' The Microsoft Visual Basic window will open and you will see the macro code that you recorded.
3. Click the 'Run' menu and select 'Reset' to stop the macro execution. Under 'Range ('A2').Select' type the following to add another row of text to 'A3':Range('A3').SelectActiveCell.FormulaR1C1 = 'I edited VBA by adding another line of text'Range('A4').Select
4. Run 'Macro1' by pressing 'F5.'

Blogger news