Sams Teach Yourself .Net in 21 Days
- Table of Contents
- Copyright
- About the Author
- About the Technical Editor
- Acknowledgments
- We Want to Hear from You
- Introduction
- Week 1: At a Glance
- Day 1. Introduction to the Microsoft .NET Framework
- Day 2. Introduction to Visual Studio .NET
- Day 3. Writing Windows Forms Applications
- Day 4. Deploying Windows Forms Applications
- Day 5. Writing ASP.NET Applications
- Day 6. Deploying ASP.NET Applications
- Day 7. Exceptions, Debugging, and Tracing
- Week 1. In Review
- Week 2: At a Glance
- Day 8. Core Language Concepts in Visual Basic .NET and C#
- Day 9. Using Namespaces in .NET
- Day 10. Accessing Data with ADO.NET
- Day 11. Understanding Visual Database Tools
- Day 12. Accessing XML in .NET
- Day 13. XML Web Services in .NET
- Day 14. Components and .NET
- Week 2. In Review
- Week 3: At a Glance
- Day 15. Writing International Applications
- Day 16. Using Macros in Visual Studio .NET
- Day 17. Automating Visual Studio .NET
- Day 18. Using Crystal Reports
- Day 19. Understanding Microsoft Application Center Test
- Day 20. Using Visual SourceSafe
- Day 21. Object Role Modeling with Visio
- Week 3. In Review
Using the Macro Explorer
To become familiar with the Macros environment, create a new Windows Forms application and name it LearnMacros_vb or LearnMacros_cs, depending on your language. Macros in Visual Studio .NET only understand Visual Basic .NET, so the actual macro code that you create and examine today is in Visual Basic .NET. You can still use macros with any project template and any language in Visual Studio .NET.
The Macro Explorer is your window for managing macros in Visual Studio .NET. To open the Macros Explorer, you can press the Alt+F8 key combination, or select Other Windows, Macro Explorer from the View menu. From the Macro Explorer, you can
-
View, edit, and run your macros
-
View, edit, and run the macro samples that come with Visual Studio .NET
-
Create new macro projects
-
Load or unload macro projects
Figure 16.1 shows the Macro Explorer with the MyMacros default project and the Samples project that comes with Visual Studio .NET expanded.
Figure 16.1 The Macro Explorer.
To record macros and perform other macro management, you can access the Macro options by selecting the Tools, Macros menu as shown in Figure 16.2.
Figure 16.2 Use the Tools menu to get to macros options.
To get an idea of what the Macro Explorer can do and how to work with macros, you need to record your first macro.
Recording a Macro | Next Section

Account Sign In
View your cart