Microsoft Office Tutorials and References
In Depth Information
Recording Your First Macro
and constant requests for changes, and your error rate goes up. Why not calmly record a
macro, ensure that everything is running correctly, and then forget it? The macro is sure to
perform every action the same way every time you run it, reducing the chance for errors.
Problem 3: Awkward navigation. Remember that you’re creating these dashboards and
reports for an audience that probably has a limited knowledge of Excel. If your reports are a
bit too difficult to use and navigate, you’ll slowly lose support for your cause. It’s always
helpful to make your dashboard more user-friendly. Here are some ideas for macros that make
things easier for everyone:
A macro to format and print a worksheet or range of worksheets at the touch of a button
Macros that navigate a multisheet worksheet with a navigation page or with a go to
button for each sheet in your workbook
A macro that saves the open document in a specified location and then closes the
application at the touch of a button.
Obviously, you can perform each of the preceding examples in Excel without the aid of a macro.
However, your audience will appreciate the little touches that help make perusing your dashboard a
bit more pleasant.
Recording Your First Macro
If you’re starting off with dashboard automation, it’s unlikely that you will be able to write the VBA
code by hand. Without full knowledge of Excel’s object model and syntax, writing the code needed
would be impossible for most beginning users. This is where recording a macro comes in handy. You
record the desired action and then run the macro each time you want that action to be performed.
To start creating your first macro, open the Chapter 13 Samples.xlsm file found in
the sample files for this topic. When the file is open, go to the Recording Your First
Macro tab.
On the Web
To begin, you first need to unhide the Developer tab. The full macro toolset in Excel 2013 is found on
the Developer tab, which is initially hidden. You have to explicitly tell Excel to make it visible. To
enable the Developer tab, follow these steps:
1. Go to the Ribbon and select the File tab.
2. To open the Excel Options dialog box, click the Options button.
3. Click the Customize Ribbon button.
In the list on the right, you see all the available tabs.
4. Select the Developer tab (see Figure 13-1).
5. Click OK.
Search JabSto ::

Custom Search