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 110 | Next

Jim DeMarco

"Pro Excel 2007 VBA"


Taking existing code that you reuse often or rewrite in a similar manner is a great way to start
moving into OOP practices.
As you move into the next chapter and begin looking at some of the XML features of Excel
2007, you??™ll continue developing objects to do your work for you. Some will provide a level of
reusability; some may be one-offs. There is no rule that says all of your code must be reusable.
In fact, you might find that you write a lot of code for an application that is specific to that
application. This is perfectly acceptable. Reusability is not the only advantage to programming
custom objects. Ease of maintenance is another by-product of OOP, and is just as
valuable as code reuse.
CHAPTER 2 n DATA IN, DATA OUT 97
Using XML in Excel 2007
The XML file format was introduced with Excel 2003 (XML support was introduced in Excel
2000). Excel 2007 has new XML file formats. The *.xlsx format represents a workbook that
does not and cannot contain macros. The *.xlsm format represents a workbook that can or
does contain macros. This separation is a security enhancement that lets the user know in
advance of opening a document that there may be code inside. Remember the ???This document
may contain harmful code??? warnings in previous Microsoft Office versions? With these,
you would not be aware of the possibility of code until you opened the file. Now, your users
will know in advance if they are opening a workbook containing code.
The Excel XML format is compatible with Microsoft Office 2003, Office XP, and Office 2000
with the addition of a file format converter patch, available from Microsoft Office Online and
Microsoft Update.


Pages:
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122