×

Uh-oh, it looks like your Internet Explorer is out of date.

For a better shopping experience, please upgrade now.

Excel VBA Macro Programming / Edition 1
  • Alternative view 1 of Excel VBA Macro Programming / Edition 1
  • Alternative view 2 of Excel VBA Macro Programming / Edition 1
     

Excel VBA Macro Programming / Edition 1

4.0 2
by Richard Shepherd
 

ISBN-10: 0072231440

ISBN-13: 9780072231441

Pub. Date: 01/14/2004

Publisher: McGraw-Hill Professional Publishing

Make Excel work harder and faster for you. This unique book presents sample code for more than twenty practical, high-powered Excel VBA macro applications. You’ll get all the essentials of VBA, and then explore ways to power Excel with VBA. Automate tasks, convert numbers to labels, transpose cells, add formula details, globally changes values, and much, much

Overview

Make Excel work harder and faster for you. This unique book presents sample code for more than twenty practical, high-powered Excel VBA macro applications. You’ll get all the essentials of VBA, and then explore ways to power Excel with VBA. Automate tasks, convert numbers to labels, transpose cells, add formula details, globally changes values, and much, much more.

Product Details

ISBN-13:
9780072231441
Publisher:
McGraw-Hill Professional Publishing
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)

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

Customer Reviews

Average Review:

Post to your social network

     

Most Helpful Customer Reviews

See all customer reviews

Excel VBA Macro Programming 4 out of 5 based on 0 ratings. 2 reviews.
Anonymous More than 1 year ago
Guest More than 1 year ago
An excellent book. This has opened up a whole new dimension to Excel and shown me how to write very effective code. Following the book, I have even created my own professional add in. I was amazed how well it works - my friends are very impressed! Plenty of examples to follow and copy in which all work. They go from easy to complicated e.g. adding row and column totals onto a selected matrix of numbers with a single click. The book is easy to follow and is well written.