CHF38.00
Download est disponible immédiatement
Enhance productivity in any Office application with zero programming experience
Mastering VBA for Microsoft Office 2016 helps you extend the capabilities of the entire Office suite using Visual Basic for Applications (VBA). Even if you have no programming experience , you'll be automating routine computing processes quickly using the simple, yet powerful VBA programming language. Clear, systematic tutorials walk beginners through the basics, while intermediate and advanced content guides more experienced users toward efficient solutions. This comprehensive guide starts at the beginning to get you acquainted with VBA so you can start recording macros right away. You'll then build upon that foundation to utilize the full capabilities of the language as you use loops and functions, message boxes, input boxes, and dialog boxes to design your own Office automation program. Add-ins, embedded macros, content controls, and more give you advanced tools to enhance productivity, and all instruction is backed by real-world practice projects in Word, Excel, Outlook, and PowerPoint.
Productivity is the name of the game, and automating certain computing tasks is an easy solution with significant impact for any business. This book shows you how, with step-by-step guidance and expert insight.
Expand Office 2016 functionality with macros
Learn how to work with VBA and the entire Office suite
Create effective code, even with no programing experience
Understand ActiveX, XML-based files, the developer tab, and more
VBA is designed to be understandable and accessible to beginners, but powerful enough to create specialized business applications. If you're ready to begin exploring the possibilities, Mastering VBA for Microsoft Office 2016 gets you started right away.
Auteur
Richard Mansfield is a best-selling author and a widely recognized expert on computer programming. He has authored or co-authored 46 books, including Programming: A Beginner's Guide, and the best-sellers Machine Language for Beginners, and The Visual Guide to Visual Basic. Overall, his books have sold more than half a million copies worldwide and have been translated into 12 languages.
Contenu
Introduction xxxi
Part 1 Recording Macros and Getting Started with VBA 1
Chapter 1 Recording and Running Macros in the Office Applications 3
What Is VBA and What Can You Do with It? 3
Understanding Macro Basics 5
Recording a Macro 6
Running a Macro 23
Recording a Sample Word Macro 24
Recording a Sample Excel Macro 27
Specifying How to Trigger an Existing Macro 29
Deleting a Macro 29
The Bottom Line 31
Chapter 2 Getting Started with the Visual Basic Editor .33
Opening the Visual Basic Editor 33
Using the Visual Basic Editor's Main Windows 36
Setting Properties for a Project 48
Customizing the Visual Basic Editor 51
The Bottom Line 64
Chapter 3 Editing Recorded Macros .67
Testing a Macro in the Visual Basic Editor 68
Editing a Word Macro 73
Editing the Excel Macro 76
Editing a PowerPoint Macro 80
The Bottom Line 87
Chapter 4 Creating Code from Scratch in the Visual Basic Editor .89
Setting Up the Visual Basic Editor to Create Macros 89
Creating a Procedure for Word 91
Creating a Macro for Excel 96
Creating a Procedure for PowerPoint 101
Creating a Procedure for Access 106
The Bottom Line 107
Part 2 Learning How to Work with VBA 109
Chapter 5 Understanding the Essentials of VBA Syntax 111
Getting Ready 111
Procedures 112
Statements 114
Keywords 117
Expressions 118
Operators 118
Variables 118
Constants 120
Arguments 120
Objects 123
Collections 123
Properties 123
Methods 124
Events 124
The Bottom Line 126
Chapter 6 Working with Variables, Constants, and Enumerations 129
Working with Variables 130
Working with Constants 147
Working with Enumerations 149
The Bottom Line 150
Chapter 7 Using Array Variables 151
What Is an Array? 151
Declaring an Array 153
Storing Values in an Array 155
Multidimensional Arrays 156
Declaring a Dynamic Array 157
Redimensioning an Array 157
Returning Information from an Array 158
Erasing an Array 158
Determining Whether a Variable Is an Array 158
Finding the Bounds of an Array 158
Sorting an Array 159
Searching an Array 163
The Bottom Line 173
Chapter 8 Finding the Objects, Methods, and Properties You Need .175
What Is an Object? 175
Working with Collections 180
Finding the Objects You Need 182
Using Object Variables to Represent Objects 194
Team Programming and OOP 197
The Bottom Line 199
Part 3 Making Decisions and Using Loops and Functions 201
Chapter 9 Using Built-In Functions 203
What Is a Function? 203
Using Functions 205
Using Functions to Convert Data 208
Using the Asc Function to Return a Character Code 210
Using the Val Function to Extract a Number from the Start of a String 210
Using the Format Function to Format an Expression 213
Using the Chr Function and Constants to Enter Special Characters in a String 218
Using Functions to Manipulate Strings 219
Using the Left, Right, and Mid Functions to Return Part of a String 221
Using InStr and InStrRev to Find a String within another String 224
Using LTrim, RTrim, and Trim to Remove Spaces from a String 227
Using Len to Check the Length of a String 228
Using StrConv, LCase, and UCase to Change the Case of a String 229 Using the StrComp Fu...