|
|
1 | (347) |
|
Introduction to VBA Development in Excel |
|
|
3 | (5) |
|
|
3 | (1) |
|
|
4 | (1) |
|
|
5 | (1) |
|
|
5 | (1) |
|
|
6 | (1) |
|
|
7 | (1) |
|
|
8 | (8) |
|
|
8 | (1) |
|
Objects, Properties, Methods, and Events |
|
|
8 | (2) |
|
|
10 | (1) |
|
|
10 | (1) |
|
|
11 | (4) |
|
|
15 | (1) |
|
|
16 | (15) |
|
|
16 | (1) |
|
Important Features of the VBE |
|
|
16 | (4) |
|
|
20 | (1) |
|
The Immediate and Watch Windows |
|
|
21 | (1) |
|
|
22 | (5) |
|
|
27 | (1) |
|
|
28 | (1) |
|
|
29 | (2) |
|
|
31 | (15) |
|
|
31 | (1) |
|
|
31 | (2) |
|
|
33 | (10) |
|
|
43 | (3) |
|
|
46 | (35) |
|
|
46 | (1) |
|
|
46 | (1) |
|
Declaring Variables and Constants |
|
|
47 | (5) |
|
|
52 | (1) |
|
Input Boxes and Message Boxes |
|
|
53 | (1) |
|
Message Boxes with Yes and No Buttons |
|
|
54 | (3) |
|
Using Excel Functions in VBA |
|
|
57 | (1) |
|
|
57 | (1) |
|
|
58 | (4) |
|
Specifying Objects, Properties, and Methods |
|
|
62 | (2) |
|
|
64 | (2) |
|
|
66 | (2) |
|
Good Programming Practices |
|
|
68 | (1) |
|
|
69 | (7) |
|
|
76 | (5) |
|
|
81 | (20) |
|
|
81 | (1) |
|
|
81 | (2) |
|
Important Properties and Methods of Ranges |
|
|
83 | (3) |
|
Specifying Ranges with VBA |
|
|
86 | (2) |
|
Examples of Ranges with VBA |
|
|
88 | (10) |
|
|
98 | (3) |
|
|
101 | (29) |
|
|
101 | (1) |
|
|
101 | (2) |
|
|
103 | (6) |
|
|
109 | (3) |
|
|
112 | (6) |
|
|
118 | (2) |
|
|
120 | (5) |
|
|
125 | (5) |
|
Working with Other Excel Objects |
|
|
130 | (20) |
|
|
130 | (1) |
|
|
130 | (2) |
|
Collections and Members of Collections |
|
|
132 | (2) |
|
Examples of Workbooks in VBA |
|
|
134 | (3) |
|
Examples of Worksheets in VBA |
|
|
137 | (5) |
|
Examples of Charts in VBA |
|
|
142 | (5) |
|
|
147 | (3) |
|
|
150 | (26) |
|
|
150 | (1) |
|
|
150 | (1) |
|
|
151 | (2) |
|
Rules for Working with Arrays |
|
|
153 | (3) |
|
Examples of Arrays in VBA |
|
|
156 | (15) |
|
|
171 | (1) |
|
|
171 | (5) |
|
More on Variables and Subroutines |
|
|
176 | (26) |
|
|
176 | (1) |
|
|
176 | (3) |
|
Scope of Variables and Subroutines |
|
|
179 | (2) |
|
|
181 | (3) |
|
|
184 | (7) |
|
|
191 | (5) |
|
The Workbook_Open Event Handler |
|
|
196 | (1) |
|
|
197 | (5) |
|
|
202 | (34) |
|
|
202 | (1) |
|
|
202 | (3) |
|
|
205 | (4) |
|
Setting Properties of Controls |
|
|
209 | (4) |
|
Creating a User Form Template |
|
|
213 | (1) |
|
|
213 | (10) |
|
|
223 | (1) |
|
Looping Through the Controls on a User Form |
|
|
223 | (1) |
|
|
224 | (1) |
|
Working with the Forms and Control Toolbox Toolbars |
|
|
225 | (4) |
|
|
229 | (7) |
|
|
236 | (7) |
|
|
236 | (1) |
|
Error Handling with On Error Statement |
|
|
236 | (2) |
|
Handling Inappropriate User Inputs |
|
|
238 | (2) |
|
|
240 | (3) |
|
Working with Files and Folders |
|
|
243 | (21) |
|
|
243 | (1) |
|
|
243 | (2) |
|
Dialog Boxes for File Operations |
|
|
245 | (6) |
|
|
251 | (3) |
|
A File Renumbering Example |
|
|
254 | (4) |
|
|
258 | (4) |
|
|
262 | (2) |
|
Importing Data into Excel from a Database |
|
|
264 | (23) |
|
|
264 | (1) |
|
|
264 | (2) |
|
A Brief Introduction to Relational Databases |
|
|
266 | (5) |
|
A Brief Introduction to SQL |
|
|
271 | (4) |
|
The Technology: DAO and ADO |
|
|
275 | (5) |
|
Discussion of the SalesOrders Exercise |
|
|
280 | (4) |
|
|
284 | (3) |
|
Working with Pivot Tables |
|
|
287 | (19) |
|
|
287 | (1) |
|
Working with Pivot Tables Manually |
|
|
287 | (8) |
|
Working with Pivot Tables Using VBA |
|
|
295 | (3) |
|
|
298 | (6) |
|
|
304 | (2) |
|
Working with Menus and Toolbars |
|
|
306 | (20) |
|
|
306 | (1) |
|
|
306 | (3) |
|
Relevant Objects for Menus and Toolbars |
|
|
309 | (7) |
|
Modifying Menu Bars and Toolbars |
|
|
316 | (7) |
|
|
323 | (3) |
|
Automating Solver and Other Add-Ins |
|
|
326 | (21) |
|
|
326 | (1) |
|
|
326 | (2) |
|
|
328 | (9) |
|
|
337 | (2) |
|
Programming with Palisade Add-Ins |
|
|
339 | (3) |
|
|
342 | (5) |
|
PART II VBA Management Science Applications |
|
|
347 | (320) |
|
Basic Ideas for Application Development with VBA |
|
|
349 | (25) |
|
|
349 | (1) |
|
Guidelines for Application Development |
|
|
349 | (6) |
|
|
355 | (17) |
|
|
372 | (2) |
|
|
374 | (17) |
|
|
374 | (1) |
|
Functionality of the Application |
|
|
374 | (1) |
|
|
375 | (1) |
|
Setting Up the Excel Sheets |
|
|
375 | (3) |
|
Getting Started with the VBA |
|
|
378 | (5) |
|
The User Forms and Their Event Handlers |
|
|
383 | (3) |
|
The VBA Code in the Module |
|
|
386 | (3) |
|
|
389 | (2) |
|
A Product Mix Application |
|
|
391 | (20) |
|
|
391 | (1) |
|
Functionality of the Application |
|
|
392 | (1) |
|
|
392 | (3) |
|
Setting Up the Excel Sheets |
|
|
395 | (1) |
|
Getting Started with the VBA |
|
|
395 | (2) |
|
The User Forms and Its Event Handlers |
|
|
397 | (1) |
|
The VBA Code in the Module |
|
|
398 | (10) |
|
|
408 | (3) |
|
An Employee-Scheduling Application |
|
|
411 | (14) |
|
|
411 | (1) |
|
Functionality of the Application |
|
|
411 | (1) |
|
|
412 | (1) |
|
Setting Up the Excel Sheets |
|
|
413 | (3) |
|
Getting Started with the VBA |
|
|
416 | (1) |
|
The User Forms and Its Event Handlers |
|
|
417 | (2) |
|
The VBA Code in the Module |
|
|
419 | (3) |
|
|
422 | (3) |
|
A Production-Planning Application |
|
|
425 | (26) |
|
|
425 | (1) |
|
Functionality of the Application |
|
|
425 | (1) |
|
|
426 | (8) |
|
Setting Up the Excel Sheets |
|
|
434 | (1) |
|
Getting Started with the VBA |
|
|
435 | (1) |
|
The User Forms and Their Event Handlers |
|
|
436 | (5) |
|
The VBA Code in the Module |
|
|
441 | (8) |
|
|
449 | (2) |
|
|
451 | (20) |
|
|
451 | (1) |
|
Functionality of the Application |
|
|
452 | (1) |
|
|
452 | (2) |
|
Setting Up the Access Database |
|
|
454 | (2) |
|
Setting Up the Excel Worksheets |
|
|
456 | (1) |
|
Getting Started with the VBA |
|
|
457 | (1) |
|
The User Forms and Its Event Handlers |
|
|
458 | (2) |
|
The VBA Code in the Module |
|
|
460 | (8) |
|
|
468 | (3) |
|
A Stock-Trading Simulation Application |
|
|
471 | (13) |
|
|
471 | (1) |
|
Functionality of the Application |
|
|
472 | (1) |
|
|
472 | (2) |
|
Setting Up the Excel Sheets |
|
|
474 | (3) |
|
Getting Started with the VBA |
|
|
477 | (1) |
|
The VBA Code in the Module |
|
|
478 | (4) |
|
|
482 | (2) |
|
A Capital-Budgeting Application |
|
|
484 | (14) |
|
|
484 | (1) |
|
Functionality of the Application |
|
|
485 | (1) |
|
|
485 | (2) |
|
Setting Up the Excel Sheets |
|
|
487 | (2) |
|
Getting Started with the VBA |
|
|
489 | (1) |
|
The User Form and Its Event Handlers |
|
|
489 | (1) |
|
The VBA Code in the Module |
|
|
490 | (6) |
|
|
496 | (2) |
|
|
498 | (14) |
|
|
498 | (1) |
|
Functionality of the Application |
|
|
498 | (1) |
|
|
499 | (2) |
|
Setting Up the Excel Sheets |
|
|
501 | (1) |
|
Getting Started with the VBA |
|
|
501 | (2) |
|
The User Form and Its Event Handlers |
|
|
503 | (2) |
|
The VBA Code in the Module |
|
|
505 | (5) |
|
|
510 | (2) |
|
An Exponential Utility Application |
|
|
512 | (13) |
|
|
512 | (1) |
|
Functionality of the Application |
|
|
513 | (1) |
|
|
513 | (1) |
|
Setting Up the Excel Sheets |
|
|
514 | (3) |
|
Getting Started with the VBA |
|
|
517 | (1) |
|
The User Form and Its Event Handlers |
|
|
518 | (2) |
|
The VBA Code in the Module |
|
|
520 | (4) |
|
|
524 | (1) |
|
A Queueing Simulation Application |
|
|
525 | (19) |
|
|
525 | (1) |
|
Functionality of the Application |
|
|
526 | (1) |
|
|
526 | (2) |
|
Setting Up the Excel Sheets |
|
|
528 | (1) |
|
Getting Started with the VBA |
|
|
529 | (1) |
|
The Structure of a Queueing Simulation |
|
|
530 | (2) |
|
The VBA Code in the Module |
|
|
532 | (10) |
|
|
542 | (2) |
|
An Option-Pricing Application |
|
|
544 | (23) |
|
|
544 | (1) |
|
Functionality of the Application |
|
|
545 | (1) |
|
|
545 | (2) |
|
Setting Up the Excel Sheets |
|
|
547 | (3) |
|
Getting Started with the VBA |
|
|
550 | (1) |
|
The User Form and Its Event Handlers |
|
|
551 | (3) |
|
The VBA Code in the Module |
|
|
554 | (11) |
|
|
565 | (2) |
|
An Application for Finding Betas of Stocks |
|
|
567 | (19) |
|
|
567 | (1) |
|
Functionality of the Application |
|
|
567 | (1) |
|
|
568 | (1) |
|
Setting Up the Excel Sheets |
|
|
569 | (3) |
|
Getting Started with the VBA |
|
|
572 | (1) |
|
The User Form and Its Event Handlers |
|
|
573 | (4) |
|
The VBA Code in the Module |
|
|
577 | (7) |
|
|
584 | (2) |
|
A Portfolio Optimization Application |
|
|
586 | (25) |
|
|
586 | (1) |
|
Functionality of the Application |
|
|
586 | (1) |
|
|
587 | (4) |
|
|
591 | (3) |
|
Setting Up the Excel Sheets |
|
|
594 | (1) |
|
Getting Started with the VBA |
|
|
594 | (1) |
|
The User Forms and Their Event Handlers |
|
|
595 | (3) |
|
The VBA Code in the Module |
|
|
598 | (12) |
|
|
610 | (1) |
|
A Data Envelopment Analysis Application |
|
|
611 | (20) |
|
|
611 | (1) |
|
Functionality of the Application |
|
|
611 | (1) |
|
|
612 | (2) |
|
Setting Up the Excel Sheets and the Text File |
|
|
614 | (1) |
|
Getting Started with the VBA |
|
|
615 | (1) |
|
Getting Data from a Text File |
|
|
616 | (1) |
|
The VBA Code in the Module |
|
|
617 | (11) |
|
|
628 | (3) |
|
An AHP Application for Choosing a Job |
|
|
631 | (26) |
|
|
631 | (1) |
|
Functionality of the Application |
|
|
631 | (1) |
|
|
632 | (5) |
|
Setting Up the Excel Sheets |
|
|
637 | (1) |
|
Getting Started with the VBA |
|
|
637 | (2) |
|
The User Forms and Their Event Handlers |
|
|
639 | (5) |
|
The VBA Code in the Module |
|
|
644 | (10) |
|
|
654 | (3) |
|
A Poker Simulation Application |
|
|
657 | (10) |
|
|
657 | (1) |
|
Functionality of the Application |
|
|
658 | (1) |
|
|
658 | (1) |
|
Setting Up the Excel Sheets |
|
|
658 | (1) |
|
Getting Started with the VBA |
|
|
659 | (1) |
|
The VBA Code in the Module |
|
|
660 | (7) |
|
|
667 | |