You saw how to build your own subroutines to
perform tasks and learned that subroutines do not return a value. When you need a routine
to return a value, you create functions. Functions can also perform tasks just like subroutines.
Type statements allow you to create complex custom data types, such as the Employee
type created in this chapter. Types are similar to classes but without the ability to contain
code within their data elements.
You then explored class modules. Class modules allow you to create custom objects.
These objects can contain properties and methods to perform any task the object needs.
Finally, you looked at the Excel 2007 UserForm object and its Toolbox. UserForms allow
you to create data entry forms and data display screens from within the Excel VBE. The Toolbox
contains many common controls that you can use on the UserForm, including text boxes,
combo boxes, and command buttons. It??™s similar to the Toolbox in Microsoft Access.
You are equipped with a very powerful set of development tools in Excel 2007. In Chapter
2, we are going to look at the many ways to bring data in and out of an Excel 2007 workbook
project.
CHAPTER 1 n THE MACRO RECORDER AND CODE MODULES 41
Data In, Data Out
Excel 2007 provides us with a number of methods to bring in data. We can import or link to
many different data sources, including Microsoft Access databases, SQL Server databases, text
files, ODBC databases, and XML files, to name a few.
Excel??™s Data Import Tools
Excel 2007 has a rich set of data handling tools.
Pages:
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69