更新时间:2021-06-11 18:16:56
封面
版权信息
Why subscribe?
Contributors About the author
About the reviewer
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Code in Action
Download the color images
Conventions used
Sections
Get in touch
Reviews
Chapter 1: Getting Started with VBA
Technical requirements
Investigating VBA code
Recording a macro
Testing the macro
Using the VBA Editor
Editing the code by changing cell references
Saving the file with an embedded macro
Using the Trust Center for macro security
Creating a customized ribbon
Chapter 2: Working with the VBA Editor
Identifying activating and closing components in the VBA Editor
Creating a module for storing a Sub procedure
Creating a basic procedure in the code window of the Editor
Creating VBA code in the code window in three different ways
Customizing the Editor tab to suit your preferences
Chapter 3: The VBA Object Model
Understanding and identifying objects in VBA
Objects as a collection and changing the attributes of the entire collection
Modifying object properties
Associating methods with objects
Using events to activate objects
Using the Object Browser in the VBA Editor
Chapter 4: Working with Procedures
Creating Sub and Function procedures
Executing Sub procedures directly
Executing Sub procedures from the Macro dialog box
Executing Sub procedures using buttons
Executing Sub procedures using a shortcut key
Executing Function procedures using a worksheet formula
Executing Function procedures by calling from a Sub procedure
Chapter 5: Next Level Recording
Setting the macro recorder for absolute or relative reference
Recording options
Chapter 6: VBA Language Elements
Adding comments
Declaring variables
Declaring constants
Working with data types in variables and constants
Scoping variables
Declaring arrays
Chapter 7: Working with Ranges
Referring to ranges
Using the Range object properties
Adding the Range object's methods
Making ranges work
Chapter 8: Using Functions
Using built-in VBA functions
Using worksheet functions
Creating custom functions
Chapter 9: Implementing Program Flow
Exploring program flow
Changing the flow using the GoTo statement
Using If and If-Then structures to make decisions
Using the Select Case structure
Using loops
Chapter 10: Implementing Automation
Writing event handler procedures
Discovering events
Creating workbook-related events
Creating worksheet-related events
Creating non-object events
Chapter 11: Handling Errors
Handling different types of errors
Correcting a runtime error
Testing to find errors
Using the On Error statement
Resuming after an error
Chapter 12: Debugging
Exploring various bugs
Debugging techniques
Using the debugger in Excel
Chapter 13: Creating and Modifying Dialog Boxes