Excel VBA Macro Programming / Edition 1

Excel VBA Macro Programming / Edition 1

by Richard Shepherd
ISBN-10:
0072231440
ISBN-13:
9780072231441
Pub. Date:
01/14/2004
Publisher:
McGraw Hill LLC
ISBN-10:
0072231440
ISBN-13:
9780072231441
Pub. Date:
01/14/2004
Publisher:
McGraw Hill LLC
Excel VBA Macro Programming / Edition 1

Excel VBA Macro Programming / Edition 1

by Richard Shepherd

Paperback

$42.0 Current price is , Original price is $42.0. You
$42.00 
  • SHIP THIS ITEM
    Qualifies for Free Shipping
  • PICK UP IN STORE
    Check Availability at Nearby Stores
  • SHIP THIS ITEM

    Temporarily Out of Stock Online

    Please check back later for updated availability.


Overview

Publisher's Note: Products purchased from Third Party sellers are not guaranteed by the publisher for quality, authenticity, or access to any online entitlements included with the product.


Develop powerful, custom Excel applications using Visual Basic for Applications

Maximize the features and functionality of Excel with help from this unique resource designed specifically for power users. Inside, you’ll find complete details on Excel VBA programming and application development—from the fundamentals to advanced techniques. Then, you’ll get 21 real-world projects, complete with working code, so you can create Excel VBA macros right away. These projects include everything from setting up timed events to auto totaling a matrix of numbers to altering the appearance of spreadsheet components—and much more.
  • Write and debug VBA code
  • Create custom dialog boxes and toolbars
  • Take advantage of the Excel object model
  • Write code to interact with a database
  • Use application programming interface (API) calls
  • Create and use class modules
  • Develop unique menus within the Excel menu structure
  • Expand calculation and search functions
  • Write macros for customized worksheets
  • Create full-fledged Excel add-ins




Product Details

ISBN-13: 9780072231441
Publisher: McGraw Hill LLC
Publication date: 01/14/2004
Series: In-Depth Programming and Web Development Series
Pages: 320
Product dimensions: 7.30(w) x 9.10(h) x 0.70(d)

About the Author

Richard Shepherd (Reading, Berkshire, England) is a qualified accountant with a special interest in computer languages, particularly Visual Basic, and he’s spent the last 20 years developing computer software in blue chip organizations.

Table of Contents

Acknowledgmentsxiii
Introductionxiii
Part IProgramming in Excel VBA
Chapter 1The Basics3
Exploring the Visual Basic Editor in Excel3
Chapter 2Variables, Arrays, Constants, and Data Types11
Variables11
Data Types16
VBA Data Types18
Arrays20
User-Defined Types22
Constants23
Reserved Words23
Chapter 3Modules, Functions, and Subroutines25
Modules25
The Difference Between Subroutines and Functions26
Writing a Simple Subroutine27
Writing a Simple Function28
Public and Private Functions and Subroutines30
Argument Data Types31
Optional Arguments31
Passing Arguments by Value31
Chapter 4Programming Basics: Decisions and Looping33
Decisions34
Looping37
Chapter 5Strings and Functions and Message Boxes43
Strings43
Functions47
Conversion Functions49
Format Function50
Date and Time Functions54
SendKeys Command60
Message Boxes64
Chapter 6Operators67
Arithmetic Operators68
Comparison Operators70
Concatenation Operator70
Logical Operators71
Other Operators74
Chapter 7Debugging77
Types of Errors77
Design Time, Runtime, and Break Mode78
Breakpoints80
Using Stop Statements80
Running Selected Parts of Your Code80
The Debug Window82
Events That Can Cause Problems When Debugging84
Using Message Boxes in Debugging84
Avoiding Bugs86
Chapter 8Errors and the Error Function87
The Resume Statement89
Implications of Error Trapping90
Generating Your Own Errors90
Chapter 9Dialogs91
Viewing Your Form95
Displaying Your Form in Code97
Populating Your Form97
Default Toolbox Controls98
Chapter 10Common Dialog Control107
Using the Common Dialog Control108
Default Dialogs114
Chapter 11Command Bars and Buttons117
Command Bars118
Command Buttons121
Part IIObject Models
Chapter 12The Excel Object Model125
Properties and Methods Explained126
Using the Object Browser134
Hierarchy137
Recording Macros138
Chapter 13The Excel Object Model--Main Objects141
Application Object141
Workbook Object147
Windows Object149
Worksheet Object153
Range Object155
Chapter 14Using Excel to Interact with Other Office Programs161
Driving Microsoft Outlook164
Driving Excel from Other Office Programs166
Part IIIAdvanced Techniques in Excel VBA
Chapter 15Charts and Graphs171
Chapter 16Working with Databases177
ODBC Links177
Using ADO179
Chapter 17API Calls183
What Is an API Call?183
Using an API Call184
Chapter 18Class Modules193
Inserting a Class Module194
Creating an Object194
Creating a Collection195
Using the PNames Collection198
Chapter 19Animation199
Part IVVBA in Action
Chapter 20Converting Labels to Numbers and Numbers to Labels205
Chapter 21Transposing a Range of Cells209
Chapter 22Adding Formula Details into Comments213
Chapter 23Calculating a Range217
Chapter 24Reversing a Label219
Chapter 25Who Created the Workbook?221
Chapter 26Evaluating a Cell225
Chapter 27Sorting Worksheets into Alphabetical Order229
Chapter 28Replacing Characters in a String231
Chapter 29Timed Events235
Chapter 30Auto Totaling a Matrix of Numbers237
Chapter 31Absolute and Relative Formulas241
Chapter 32Coloring Alternate Rows and Columns of the Spreadsheet245
Chapter 33Coloring Cells Containing Formulas251
Chapter 34Summing Cells by Reference to a Master Cell255
Chapter 35Globally Changing a Range of Values259
Chapter 36Displaying Hidden Sheets Without a Password263
Chapter 37Searching Multiple Sheets and Workbooks269
Chapter 38Brighten Up Your Comments277
Chapter 39An Alternative to Message Boxes287
Chapter 40Working with Shapes291
Chapter 41Turning Your VBA Code into an Add-In295
Appendix AASCII Character Codes303
Index309
From the B&N Reads Blog

Customer Reviews