Author and Excel guru John Walkenbach, known to his devoted fans as "Mr. Spreadsheet," guides you through taking your Excel skills to the next level by creating your own customized spreadsheet solutions using Visual Basic for Applications (VBA). This updated edition of this bestselling boo
Excel VBA Programming For Dummies 5th Edition
โ Scribed by Michael Alexander
- Publisher
- For Dummies
- Year
- 2018
- Tongue
- English
- Leaves
- 494
- Series
- For Dummies
- Edition
- 5
- Category
- Library
No coin nor oath required. For personal study only.
โฆ Synopsis
Take your Excel programming skills to the next level
To take Excel to the next level, you need to understand and implement the power of Visual Basic for Applications (VBA). Excelย VBA Programming For Dummies introduces you to a wide array of new Excel options, beginning with the most important tools and operations for the Visual Basic Editor.
Inside, youโll find an overview of the essential elements and concepts for programming with Excel. In no time, youโll discover techniques for handling errors and exterminating bugs, working with range objects and controlling program flow, and much more. With friendly advice on the easiest ways to develop custom dialog boxes, toolbars, and menus, readers will be creating Excel applications custom fit to their unique needs!
- Fully updated for the new Excel 2019
- Step-by-step instructions for creating VBA macros to maximize productivity
- Guidance on customizing your applications so they work the way you want
- All sample programs, VBA code, and worksheets are available at dummies.com
Beginning VBA programmers rejoice! This easy-to-follow book makes it easier than ever to excel at Excel VBA!
โฆ Table of Contents
Introduction
About This Book
Obligatory Typographical Conventions Section
Check Your Security Settings
Foolish Assumptions
Icons Used in This Book
Sample Files Online
Where to Go from Here
Part 1: Getting Started with Excel VBA Programming
Chapter 1: What Is VBA?
Okay, So What Is VBA?
What Can You Do with VBA?
Advantages and Disadvantages of VBA
VBA in a Nutshell
Excel Compatibility
Chapter 2: Jumping Right In
First Things First
What Youโll Be Doing
Taking the First Steps
Recording the Macro
Testing the Macro
Examining the Macro
Modifying the Macro
Saving Workbooks That Contain Macros
Understanding Macro Security
Revealing More about the NameAndTime Macro
Part 2: How VBA Works with Excel
Chapter 3: Working in the Visual Basic Editor
What Is the Visual Basic Editor?
Working with the Project Window
Working with a Code Window
Customizing the VBA Environment
Chapter 4: Introducing the Excel Object Model
Excel Is an Object?
Climbing Down the Object Hierarchy
Wrapping Your Mind around Collections
Referring to Objects
Diving into Object Properties and Methods
Finding Out More
Chapter 5: VBA Sub and Function Procedures
Understanding Subs versus Functions
Naming Subs and Functions
Chapter 6: Using the Excel Macro Recorder
Recording Basics
Preparing to Record
Relative or Absolute?
What Gets Recorded?
Recording Options
Is This Thing Efficient?
Part 3: Programming Concepts
Chapter 7: Essential VBA Language Elements
Using Comments in Your VBA Code
Using Variables, Constants, and Data Types
Using Assignment Statements
Working with Arrays
Using Labels
Chapter 8: Working with Range Objects
A Quick Review
Other Ways to Refer to a Range
Some Useful Range Object Properties
Some Useful Range Object Methods
Chapter 9: Using VBA and Worksheet Functions
What Is a Function?
Using Built-In VBA Functions
Using Worksheet Functions in VBA
Using Custom Functions
Chapter 10: Controlling Program Flow and Making Decisions
Going with the Flow, Dude
The GoTo Statement
Decisions, Decisions
Knocking Your Code for a Loop
Using For Each-Next Loops with Collections
Chapter 11: Automatic Procedures and Events
Preparing for the Big Event
Where Does the VBA Code Go?
Writing an Event-Handler Procedure
Introductory Examples
Examples of Activation Events
Other Worksheet-Related Events
Events Not Associated with Objects
Chapter 12: Error-Handling Techniques
Types of Errors
An Erroneous Example
Handling Errors Another Way
Handling Errors: The Details
An Intentional Error
Chapter 13: Bug Extermination Techniques
Species of Bugs
Identifying Bugs
Debugging Techniques
About the Debugger
Bug Reduction Tips
Chapter 14: VBA Programming Examples
Working with Ranges
Changing Excel Settings
Working with Charts
VBA Speed Tips
Part 4: Communicating with Your Users
Chapter 15: Simple Dialog Boxes
UserForm Alternatives
The MsgBox Function
The InputBox Function
The GetOpenFilename Method
The GetSaveAsFilename Method
Getting a Folder Name
Displaying Excelโs Built-in Dialog Boxes
Chapter 16: UserForm Basics
Knowing When to Use a UserForm
Creating UserForms: An Overview
Working with UserForms
A UserForm Example
Chapter 17: Using UserForm Controls
Getting Started with Dialog Box Controls
Dialog Box Controls: The Details
Working with Dialog Box Controls
Dialog Box Aesthetics
Chapter 18: UserForm Techniques and Tricks
Using Dialog Boxes
A UserForm Example
A ListBox Example
Selecting a Range
Using Multiple Sets of OptionButtons
Using a SpinButton and a TextBox
Using a UserForm as a Progress Indicator
Creating a Modeless Tabbed Dialog Box
Displaying a Chart in a UserForm
A Dialog Box Checklist
Chapter 19: Accessing Your Macros through the User Interface
Customizing the Ribbon
Customizing Shortcut Menus
Part 5: Putting It All Together
Chapter 20: Creating Worksheet Functions โ and Living to Tell about It
Why Create Custom Functions?
Understanding VBA Function Basics
Writing Functions
Working with Function Arguments
Introducing Wrapper Functions
Working with Functions That Return an Array
Using the Insert Function Dialog Box
Chapter 21: Creating Excel Add-Ins
Okay โฆ So Whatโs an Add-In?
Why Create Add-Ins?
Working with Add-Ins
Understanding Add-In Basics
Looking at an Add-In Example
Part 6: The Part of Tens
Chapter 22: Ten Handy Visual Basic Editor Tips
Applying Block Comments
Copying Multiple Lines of Code at Once
Jumping between Modules and Procedures
Teleporting to Your Functions
Staying in the Right Procedure
Stepping Through Your Code
Stepping to a Specific Line in Your Code
Stopping Your Code at a Predefined Point
Seeing the Beginning and End of Variable Values
Turning Off Auto Syntax Check
Chapter 23: Resources for VBA Help
Letting Excel Write Code for You
Pilfering Code from the Internet
Leveraging User Forums
Visiting Expert Blogs
Mining YouTube for Video Training
Attending Live and Online Training Classes
Learning from the Microsoft Office Dev Center
Dissecting the Other Excel Files in Your Organization
Asking Your Local Excel Guru
Chapter 24: Ten VBA Doโs and Donโts
Do Declare All Variables
Donโt Confuse Passwords with Security
Do Clean Up Your Code
Donโt Put Everything in One Procedure
Do Consider Other Software
Donโt Assume That Everyone Enables Macros
Do Get in the Habit of Experimenting
Donโt Assume That Your Code Will Work with Other Excel Versions
Do Keep Your Users in Mind
Donโt Forget About Backups
Index
About the Author
Advertisement Page
Connect with Dummies
End User License Agreement
๐ SIMILAR VOLUMES
Take your Excel skills to the next level with VBA programming Now that you've mastered Excel basics, it's time to move to the next level-creating your own, customized Excel 2010 solutions using Visual Basic for Applications (VBA). The new edition of this non-threatening guide is your key to getting
<b>Take your Excel skills to the next level with VBA programming <p> Now that youโve mastered Excel basics, itโs time to move to the next levelโcreating your own, customized Excel 2010 solutions using Visual Basic for Applications (VBA). The new edition of this non-threatening guide is your k
Take control of your spreadsheets and use VBA to create your own custom Excel applicationsAuthor and Excel guru John Walkenbach, known to his devoted fans as "Mr. Spreadsheet," guides you through taking your Excel skills to the next level by creating your own customized spreadsheet solutions using V
Take control of your spreadsheets and use VBA to create your own custom Excel applicationsAuthor and Excel guru John Walkenbach, known to his devoted fans as ยซMr. Spreadsheet,ยป guides you through taking your Excel skills to the next level by creating your own customized spreadsheet solutions using V