Home Page Icon
Home Page
Table of Contents for
cover
Close
cover
by Mike Van Niekerk
VBA Automation for Excel 2019 Cookbook
VBA Automation for Excel 2019 Cookbook
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
Download the example code files
Code in Action
Download the color images
Conventions used
Sections
Getting ready
How to do it…
How it works…
There's more…
See also
Get in touch
Reviews
Chapter 1: Getting Started with VBA
Technical requirements
Investigating VBA code
Getting ready
How to do it…
How it works…
There's more…
Recording a macro
Getting ready
How to do it…
How it works…
There's more…
Testing the macro
Getting ready
How to do it…
How it works…
There's more…
Using the VBA Editor
Getting ready
How to do it…
How it works…
There's more…
Editing the code by changing cell references
Getting ready
How to do it…
How it works…
There's more…
Saving the file with an embedded macro
Getting ready
How to do it…
How it works…
There's more…
Using the Trust Center for macro security
Getting ready
How to do it…
How it works…
There's more…
Creating a customized ribbon
Getting ready
How to do it…
Chapter 2: Working with the VBA Editor
Technical requirements
Identifying, activating, and closing components in the VBA Editor
Getting ready
How to do it…
How it works…
Creating a module for storing a Sub procedure
Getting ready
How to do it…
How it works…
Creating a basic procedure in the code window of the Editor
Getting ready
How to do it…
How it works…
Creating VBA code in the code window in three different ways
Getting ready
How to do it…
How it works…
There's more…
Customizing the Editor tab to suit your preferences
Getting ready
How to do it…
How it works…
Chapter 3: The VBA Object Model
Technical requirements
Understanding and identifying objects in VBA
Getting ready
How to do it…
How it works…
Objects as a collection, and changing the attributes of the entire collection
Getting ready
How to do it…
How it works…
Modifying object properties
Getting ready
How to do it…
How it works…
There's more…
Associating methods with objects
Getting ready
How to do it…
How it works…
Using events to activate objects
Getting ready
How to do it…
How it works…
Using the Object Browser in the VBA Editor
Getting ready
How to do it…
How it works…
Chapter 4: Working with Procedures
Technical requirements
Creating Sub and Function procedures
Getting ready
How to do it…
How it works…
There's more…
Executing Sub procedures directly
Getting ready
How to do it…
How it works…
Executing Sub procedures from the Macro dialog box
Getting ready
How to do it…
How it works…
Executing Sub procedures using buttons
Getting ready
How to do it…
How it works…
There's more…
Executing Sub procedures using a shortcut key
Getting ready
How to do it…
How it works…
Executing Function procedures using a worksheet formula
Getting ready
How to do it…
How it works…
Executing Function procedures by calling from a Sub procedure
Getting ready
How to do it…
How it works…
Chapter 5: Next Level Recording
Technical requirements
Setting the macro recorder for absolute or relative reference
Getting ready
How to do it…
How it works…
Recording options
Getting ready
How to do it…
How it works…
Chapter 6: VBA Language Elements
Technical requirements
Adding comments
Getting ready
How to do it…
How it works…
Declaring variables
Getting ready
How to do it…
How it works…
Declaring constants
Getting ready
How to do it…
How it works…
There's more…
Working with data types in variables and constants
Getting ready
How to do it…
How it works…
Scoping variables
Getting ready
How to do it…
How it works…
Declaring arrays
Getting ready
How to do it…
How it works…
Chapter 7: Working with Ranges
Technical requirements
Referring to ranges
Getting ready
How to do it…
How it works…
Using the Range object properties
Getting ready
How to do it…
How it works…
Adding the Range object's methods
Getting ready
How to do it…
How it works…
Making ranges work
Getting ready
How to do it…
How it works…
Chapter 8: Using Functions
Technical requirements
Using built-in VBA functions
Getting ready
How to do it…
How it works…
Using worksheet functions
Getting ready
How to do it…
How it works…
Creating custom functions
Getting ready
How to do it…
How it works…
There's more…
Chapter 9: Implementing Program Flow
Technical requirements
Exploring program flow
Changing the flow using the GoTo statement
Getting ready
How to do it…
How it works…
Using If and If-Then structures to make decisions
Getting ready
How to do it…
How it works…
There's more…
Using the Select Case structure
Getting ready
How to do it…
How it works…
Using loops
Getting ready
How to do it…
How it works…
Chapter 10: Implementing Automation
Technical requirements
Writing event handler procedures
Getting ready
How to do it…
How it works…
There's more…
Discovering events
Creating workbook-related events
Getting ready
How to do it…
How it works…
Creating worksheet-related events
Getting ready
How to do it…
How it works…
Creating non-object events
Getting ready
How to do it…
How it works…
Chapter 11: Handling Errors
Technical requirements
Handling different types of errors
Getting ready
How to do it…
How it works…
Correcting a runtime error
Getting ready
How to do it…
How it works
Testing to find errors
Getting ready
How to do it…
How it works…
Using the On Error statement
Getting ready
How to do it…
How it works…
Resuming after an error
Getting ready
How to do it…
How it works…
Chapter 12: Debugging
Technical requirements
Exploring various bugs
Debugging techniques
Getting ready
How to do it…
How it works…
Using the debugger in Excel
Setting breakpoints
Using the Watch window
Chapter 13: Creating and Modifying Dialog Boxes
Technical requirements
Using the MsgBox function
Getting ready
How to do it…
How it works…
Using the InputBox function
Getting ready
How to do it…
How it works…
Using the Application.InputBox method
Getting ready
How to do it…
How it works…
Chapter 14: Creating UserForms
Technical requirements
Inserting the form
Getting ready
How to do it…
How it works…
Changing properties
Getting ready
How to do it…
How it works…
Adding controls
Getting ready
How to do it…
How it works…
There's more…
Using Frames
Getting ready
How to do it…
There's more…
Chapter 15: UserForm Controls
Technical requirements
Assigning controls
Getting ready
How to do it…
How it works
Unloading a form
Getting ready
How to do it…
How it works…
Loading the form
Getting ready
How to do it…
How it works…
Using the Combo Box control
Getting ready
How to do it…
How it works…
Using the SpinButton control
Getting ready
How to do it…
How it works…
There's more…
Setting the tab order
Getting ready
How to do it…
How it works
Chapter 16: Creating Custom Functions
Technical requirements
Writing functions
Getting ready
How to do it…
How it works…
Calling functions
Getting ready
How to do it…
How it works…
Adding function arguments
Getting ready
How to do it…
How it works…
There's more…
Displaying function and argument descriptions
Getting ready
How to do it…
Chapter 17: Creating Word Documents with Excel VBA
Technical requirements
Creating a new instance of Word
Getting ready
How to do it…
How it works…
Writing and formatting text
Getting ready
How to do it…
Copying data into Word
Getting ready
How to do it…
How it works…
See also
Using templates and bookmarks
Getting ready
How to do it…
See also
Chapter 18: Working with PowerPoint in Excel VBA
Technical requirements
Creating a new instance of PowerPoint
Getting ready
How to do it…
Creating presentations and slides
Getting ready
How to do it…
Adding text to textboxes
Getting ready
How to do it…
Copying Excel content into PowerPoint
Getting ready
How to do it…
There's more…
Other Books You May Enjoy
Leave a review - let other readers know what you think
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Next
Next Chapter
VBA Automation for Excel 2019 Cookbook
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset