VBA Developer's Handbook (2nd Edition)
by:
Ken Getz, Michael Gilbert, Mike Gilbert
|
On-line Price:
$59.99 (includes GST)
Paperback w/ CD package 1104
20%Off Retail Price
You
save: $15.00
Please call us to check availability
|
Retail Price:
$74.99
Publisher:
SYBEX,July-2001
Category:
VBA PROGRAMMING Level: I/A
ISBN: 0782129781 ISBN13: 9780782129786
|
| Add to Shopping Cart |
WRITE BULLETPROOF VBA CODE FOR ANY SITUATION
This book is the essential resource for developers working with any of the more than 300 products that employ the Visual Basic for Applications programming language. Written by recognized VBA experts, it provides detailed coverage of a wide range of specific VBA programming challenges. Its careful, step-by-step instructions and thousands of lines of code offer answers, while teaching you to devise new and creative solutions. The instruction applies equally to all VBA environments, whether you are building standalone applications or customizing commercial products using their built-in VBA programmability. Coverage Includes
Manipulating text, numbers, and dates
Using automation to control other applications
Creating objects using VBA class modules
Using standard search and sort algorithms from within VBA
Creating standard dynamic data structures, including linked lists, binary trees, stacks, and queues
Working with Windows system information, including memory status, screen info, mouse, keyboard, and power status
Working with Windows Registry data
Retrieving and setting Windows networking information
Working with the Windows file system, iterating through folders, creating and deleting files
Adding sound and movies to VBA apps using Windows multimedia extensions
Tapping the system capabilities provided by the Windows Scripting Runtime library
Writing add-ins for the Visual Basic environment
ntroduction
Chapter 1: Manipulating Strings
How Does VBA Store Strings?
Unicode versus ANSI
Using Built-In String Functions
Putting the Functions Together
Searching for and Replacing Text
Gathering Information about Strings
Converting Strings
Working with Substrings
Chapter 2: Working with Numbers
How Does VBA Store Numeric Values?
Using Built-In Numeric Functions
Custom Math and Numeric Functions
Chapter 3: Working with Dates and Times
What Is a Date, and How Did It Get There?
The Built-In VBA Date Functions
Odd Behaviors
Displaying Values the Way You Want
Beyond the Basics
Finding a Specific Date
Finding the Next Anniversary
Finding the nth Particular Weekday in a Month
Working with Workdays
Manipulating Dates and Times
Working with Elapsed Time
Handling Time Zone Differences
Chapter 4: Using VBA to Automate Other Applications
Automation Basics
Creating Object Instances
Controlling Other Applications
Creating Automation Solutions with Microsoft Office
Example: Word as a Report Writer
Example: Populating an Excel Worksheet
Tapping into Events Using WithEvents
Chapter 5: Creating Your Own Objects with VB Class Modules
Why Use Class Modules?
How Class Modules Work
A Simple Example: A Text File Class
Using Property Procedures
Creating Enumerated Types
Applying Class Module Techniques to the Windows API
Chapter 6: Advanced Class Module Techniques
Object Model Design Principles
Developing Object Hierarchies
Collections of Objects
Creating and Using Custom Events
Interface Classes and the Implements Keyword
Other Advanced Considerations
Chapter 7: Searching and Sorting in VBA
Timing Is Everything
Using Arrays
Sorting Arrays
Searching
Chapter 8: Creating Dynamic Data Structures Using Class Modules
Dynamic versus Static Data Structures
How Does This Apply to VBA?
Creating a Stack
Creating a Queue
Creating Ordered Linked Lists
Creating Binary Trees
The Tree Class
Adding a New Item
Adding a New Node: Walking the Code
Traversing the Tree
Traversing a Tree: Walking the Code
The Sample Project
What Didn't We Cover?
Chapter 9: Retrieving and Setting System Information
VBA and System Information
The API Functions
Computer and Operating System Information
Keyboard Information
Memory Status
Mouse Information
Non-Client Metrics
Power Status
Screen and Window Information
System Colors
Chapter 10: Managing Windows Registry Data
Registry Structure
VBA Registry Functions
Windows Registry Functions
An Object Model for the Registry
Chapter 11: The Windows Networking API
Basic Network Functionality
Advanced Networking Functionality
Chapter 12: Working with Disks and Files
The Built-In VBA Disk and File Functions
File I/O If You Must
The Windows API: Where the Real Power Is
Using the Windows Common File Dialogs
Chapter 13: Adding Multimedia to Your Applications
An Introduction to Windows Multimedia
One-Step Multimedia
Understanding the Media Control Interface
Putting MCI to Work
Chapter 14: Using the Scripting Runtime Library Objects
Why Is This Chapter Different?
Testing the Simple FileSystemObject Methods
Copying and Moving Files and Folders
The Drives Collection
The Drive Object
The Folder Object
The Files Collection
The File Object
The TextStream Object
Working with the Dictionary Object
Chapter 15: Writing Add-Ins for the Visual Basic IDE
Working with the IDE Object Model
Putting It Together: An Alternative Object Model
COM Add-Ins
Building a COM Add-In for the VBA IDE
Appendix A: The Reddick VBA Naming Conventions, Version 6
Changes to the Conventions
An Introduction to Hungarian
Index
Table of Contents
I
|