SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 53 | Next

Jim DeMarco

"Pro Excel 2007 VBA"

It can also be used to scroll back and forth through a range of values or a list of
items.
Image: This displays an image from a graphics file on your form.
RefEdit: This allows the user to type or click and drag range references into its text area. It
is similar to Excel??™s Set Print Area input function.
Figure 1-35 shows an example of an Excel 2007 UserForm.
Figure 1-35. Sample UserForm with controls added
Object-Oriented Programming: An Overview
I decided early on in the process of writing this book that I would concentrate my efforts on
providing guidance in the creation of class-based solutions to Excel VBA coding problems
where possible. I have found through programming in Access, VB 6, and then VB.NET that
using OOP techniques has helped me visualize my applications more clearly, helped me to
better organize my code, and has been invaluable in making my code easier to maintain. Standard
code modules and procedural programming allow us to write code anywhere we like.
Although programmers always try to group related code in the same well-named module, it??™s
not always possible and not always done. Using objects, you will find that you always create
functionality related to the object and that there??™s really no room for unrelated code. Imagine
CHAPTER 1 n THE MACRO RECORDER AND CODE MODULES 39
you??™re creating the cEmployee class shown earlier. You??™d never think of adding a Part Number
property or a CalculateHorsepower method in an Employee class.


Pages:
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65