Microsoft Excel VBA Programming for the Absolute Beginner
Author: Duane Birnbaum
If you are new to programming with Microsoft Excel VBA and are looking for a solid introduction, this is the book for you. Developed by computer science professors, books in the "for the absolute beginner" series teach the principles of programming through simple game creation. Microsoft Excel VBA Programming for the Absolute Beginner, Third Edition provides you with the skills that you need for more practical Excel VBA programming applications and shows you how to put these skills to use in real-world scenarios. Best of all, by the time you finish the book, you will be able to apply the basic principles you've learned to the next programming language you tackle.
Table of Contents:
Introduction | x | |
Chapter 1 | Visual Basic for Applications with Excel | 1 |
Project: Colorful Header | 2 | |
The VBA Integrated Development Environment (IDE) | 3 | |
Getting to the IDE from Excel | 3 | |
Components of the IDE | 4 | |
Programming Components within Excel | 8 | |
Macro Selection | 8 | |
The Visual Basic Toolbar | 9 | |
Getting Help with VBA | 13 | |
Excel Help | 14 | |
VBA Help | 14 | |
Installing VBA Help Files | 15 | |
Constructing the Colorful Header Program | 15 | |
Chapter Summary | 19 | |
Chapter 2 | Beginning Programs with VBA | 21 |
Project: Time of Your Life | 22 | |
Variables, Data Types, and Constants | 22 | |
Declaring Variables | 23 | |
Data Types | 27 | |
Constants | 36 | |
Simple Input and Output with VBA | 37 | |
Collecting User Input with InputBox() | 37 | |
Output with MsgBox() | 38 | |
Manipulating Strings with VBA Functions | 39 | |
Fun with Strings | 40 | |
Constructing the Time of Your Life Program | 44 | |
Project Statement | 44 | |
Project Tools | 44 | |
Project Algorithm | 44 | |
Adding the Code | 45 | |
Chapter Summary | 49 | |
Chapter 3 | Procedures and Conditions | 51 |
Project: Poker Dice | 52 | |
VBA Procedures | 52 | |
Event Procedures | 52 | |
Sub Procedures | 56 | |
Function Procedures | 61 | |
Logical Operators in VBA | 64 | |
Conditionals and Branching | 67 | |
Constructing the Poker Dice Program | 72 | |
Project Statement | 73 | |
Project Tools | 73 | |
Project Algorithm | 75 | |
Adding the Code | 76 | |
Chapter Summary | 84 | |
Chapter 4 | Loops and Arrays | 87 |
Project: The Math Game | 88 | |
Looping with VBA | 88 | |
Do Loops | 89 | |
For Loops | 91 | |
Input Validation | 94 | |
Validation with the InputBox() Function | 95 | |
Validation with a Spreadsheet Cell | 97 | |
Arrays | 99 | |
One-Dimensional Arrays | 101 | |
Multi-Dimensional Arrays | 104 | |
Dynamic Arrays | 106 | |
Programming Formulas into Worksheet Cells | 109 | |
A1 Style References | 109 | |
R1C1 Style References | 111 | |
Chapter Project: Math Game | 112 | |
Project Statement | 112 | |
Project Tools | 113 | |
Project Algorithm | 119 | |
Adding the Code | 122 | |
Chapter Summary | 131 | |
Chapter 5 | Basic Excel Objects | 133 |
Project: Battlecell | 134 | |
VBA and OOP | 134 | |
Objects Defined | 135 | |
VBA Collection Objects | 137 | |
The Object Browser | 139 | |
Top-Level Excel Objects | 144 | |
The Application Object | 145 | |
The Workbook and Window Objects | 145 | |
The Worksheet Object | 153 | |
The Range Object | 154 | |
Working with Objects | 157 | |
Chapter Project: Battlecell | 161 | |
Project Statement | 161 | |
Project Tools | 162 | |
Project Algorithm | 162 | |
Adding the Code | 164 | |
Chapter Summary | 184 | |
Chapter 6 | Enhancing VBA Programs: Adding Multimedia and Intelligence | 187 |
Project: Enhanced Battlecell | 188 | |
Adding Multimedia to a Program | 188 | |
Animation in VBA | 188 | |
Sound in VBA | 200 | |
Simulating Intelligence in Programs | 203 | |
Chapter Project: Enhanced Battlecell | 204 | |
Project Statement | 204 | |
Project Tools | 205 | |
Project Algorithm | 205 | |
Adding the Code | 208 | |
Chapter Summary | 224 | |
Chapter 7 | UserForms and Additional Controls | 227 |
Project: Blackjack | 228 | |
UserForms | 228 | |
Adding a UserForm to a Project | 229 | |
Components of the UserForm Object | 229 | |
Adding ActiveX Controls to a UserForm | 231 | |
Showing and Hiding UserForms | 233 | |
Modal Forms | 233 | |
Custom Dialog Boxes with UserForms | 235 | |
Chapter Project: Blackjack | 246 | |
Project Statement | 247 | |
Project Tools | 247 | |
Project Algorithm | 247 | |
Adding the Code | 250 | |
Chapter Summary | 267 | |
Chapter 8 | Data Access, File I/O, Error Handling, and Debugging | 269 |
Project: Word Find | 270 | |
File Input and Output (I/O) | 270 | |
Using VBA File I/O Methods | 271 | |
Error Handling | 283 | |
Using the On Error Statement | 283 | |
Debugging | 287 | |
Break Mode | 287 | |
The Immediate Window | 289 | |
The Watch Window | 290 | |
The Locals Window | 291 | |
Chapter Project: Word Find | 292 | |
Project Statement | 292 | |
Project Tools | 293 | |
Project Algorithm | 293 | |
Adding the Code | 296 | |
Chapter Summary | 310 | |
Chapter 9 | Excel Charts | 313 |
Project: The Alienated Game | 314 | |
The Chart Object | 314 | |
Accessing Existing Charts | 314 | |
Manipulating Charts | 318 | |
Creating Charts | 322 | |
Chart Events | 326 | |
Chapter Project: The Alienated Game | 332 | |
Project Statement | 333 | |
Project Tools | 333 | |
Project Algorithm | 333 | |
Adding the Code | 335 | |
Chapter Summary | 355 | |
Chapter 10 | VBA Shapes | 357 |
Project: Excetris | 358 | |
The Shapes Collection and Shape Objects | 358 | |
Manipulating a Shape Object | 360 | |
The ShapeRange Collection Object | 362 | |
Activating Shape Objects | 365 | |
The OLEObjects Collection | 366 | |
Chapter Project: Excetris | 368 | |
Project Statement | 369 | |
Project Tools | 369 | |
Project Algorithm | 370 | |
Adding the Code | 372 | |
Chapter Summary | 395 | |
A Final Word | 396 | |
Index | 397 |
New interesting book: Managing Workplace Negativity or Heavens Door
Add in the WorkPlace: Choices, Changes, and Challenges
Author: Kathleen G Nadeau
It's one thing to deal with attention deficit disorder in the doctor's office, or at home-but quite another "out there," in the workplace. This unique guide focuses on adults living with ADD, and illustrates various ways to initiate and maintain the best possible work situation. Kathleen Nadeau brings her vast experience to bear on this central concern of adult life. The book is packed full of helpful advice and practical suggestions on everything from day-to-day problems to career issues that can affect a lifetime-and it emphasizes that people with ADD can be just as successful in their jobs and careers as anyone else.
ADD in the Workplace features a user-friendly large, open format with summaries at the beginning of each chapter-perfect for ADD adults. It offers an easy-to-follow progression from a general understanding of the situation to various specific issues, including ADD and social skills, job performance, and career choices for young adults with ADD. No ADD adult sho
No comments:
Post a Comment