|
|
| |
| 14) Delete the last two lines. |
| |
|
| Illustration 8: Error Message. Click here to view larger image. |
| |
| 15) Write an Information message by adding a new line. |
| MsgBox "Pivot Table data has been refreshed", vbExclamation + vbInformation, "Macro Finished". |
| |
|
| Illustration 9: Warning message. Click here to view larger image. |
| |
| 16) Close the editor and run the macro again. |
| |
| 17) See the results. |
| |
|
| Illustration 10: Information Message. |
| |
| 18) Select the View Macros command from the Macros Group in the View tab in the Options Tape. |
| |
| 19) Select the SampleMacroForPivotUpdate macro and press the Step Into button. |
| |
| 20) The Visual Basic for Applications code editor will be opened. The macro code will be displayed with a yellow bacground over the macro name. |
| |
|
| Illustration 11: step into code. Click here to view larger image. |
| |
| 21) Press the F8 key. The cursor will advance to the next executable code line.
|
| |
| 22) Press F8 key twice again. |
| |
| 23) Run the Refresh sentence. |
| |
|
| Illustration 12: Execute the line with F8 key. Click here to view larger image. |
| |
| 24) Debug each line to see the final results. |
| |
| 25) Close the VBA code editor. |
| |
|