Excel 2000 Power Programming With VBA


Return to The Spreadsheet Page

Excel 2000 Power Programming With VBA

Errata

Ideally, I would like every book that I write to be completely accurate and error-free. The fast-paced nature of the computer book publishing industry makes this goal difficult to achieve. However, I assume complete responsibility for the content of my books.

Listed below are known errors in my Excel 2000 Programming With VBA. If you discover additional errors, please let me know.

NOTE: Some of these errors were corrected in subsequent printings of the book.


  • No PUP 2000 Coupon:
    The coupon for Power Utility Pak 2000 was omitted from the initial 3,000 copies of the book. If you own one of these copies, click here to print a copy of the missing coupon.
  • Page 36:
    The shortcut key combination to force a complete recalculation is Ctrl+Alt+F9 (not Ctrl+Shift+F9).
  • Page 38:
    In R1C1 cell notation, cell A2 is actually R2C1 (not R1C2).
  • Page 39:
    There's a production formatting error in the middle of the page. The following text should be in normal type (not monospaced type):

          If the linked workbook is closed, you must add the complete path to the
          workbook reference. Here's an example:
  • Page 47:
    The array formula, applied to the data in Figure 3-5, returns a result of 47, not 53.
  • Page 154:
    Table 7-3 lists RangeSelection as a property of the Application object. In fact, RangeSelection is a property of a Window object. The property is used correctly in the statement at the top of page 155.
  •  Page 146:
    The second paragraph in the Object Methods section states: "Arguments for a method are placed in parentheses." As described on page 147, that's not always the case.
  • Page 172:
    The Dim statement at the top of the page should declare StartTime as a Date. It won't cause a problem as is, but the StartTime variable is actually declared as a variant because the data type wasn't specified. I didn't heed the advice I give in the "Caution" paragraph on page 175!
  • Page 182:
    The code sample at the top of the page has a typo. It should be:

       MsgBox ActiveSheet.Name = _
          "Sheet1" Or ActiveSheet.Name = "Sheet2"
  • Page 236:
    Two variables (VisibleWins and Item) are declared, but are not used in the code. You can omit these two Dim statements.
  • Page 237:
    The code listing should have a statement at the end that turns screen updating back on.
  • Page 251:
    In the third VBA statement at the top of the page, 1000 should actually be 10000.
  • Page 252:
    Same error as on page 251.
  • Page 281-281:
    The AboutRangeSelection procedure will double-count overlapping cells. Click here for the corrected code.
  • Page 294:
    The sorting demo.xls file (on the CD-ROM) is missing the statement that initializes Array4. The demo seems to work, but it's actually sorting an array that consists only of zeros. Activate the code module for UserForm1 and insert the following statement in the section labeled Build four identical arrays:

     Array4(i) = Array1(i, 0)

  • Page 296:
    When testing the BatchProcess procedure, make sure you copy the text files to your hard drive and remove the 'read-only' permissions from the files.
  • Page 298:
    The FileNameOnly function works with any path and filename (even if the file doesn't exist). If the file exists, the function below is a simpler way to strip off the path and return only the file name:

    Private Function FileNameOnly(pname) As String
        FileNameOnly = Dir(pname)
    End Function
  • Page 308-311:
    The API functions for accessing disk drive information do not work reliably if the drive is more that 2-Gbytes in size. You can use the FileSystemObject for this. The FileSystemObject is part of the Windows Scripting Host. For more information, see this article.
  • Page 321:
    The Cross-Reference should be to Chapter 6 (not Chapter 5).
  • Page 325:
    In the OptionButton section, each set of OptionButtons must have a different GroupName property value.
  • Pages 327-328:
    The sidebar refers to a workbook on the CD-ROM. This file, named 'all controls.xls', demonstrates the use of ActiveX controls placed directly on a worksheet. Two of the demos (OptionButton and ScrollBar) don't work correctly with Excel 97. You'll need to modify the event-handler procedures for the controls.  Specifically, the code needs to select a cell on the worksheet before it sets the Cells.Interior.Color property. Just insert this statement at the beginning of each of the event-handler procedures:

         Range("A10").Select

    This change is not be necessary if you're using Excel 2000.
  • Page 360:
    In the third code example, the comment should be:

        '... [code if Yes button is clicked] ...
  • Page 375:
    In the OptionsButton_Click procedure, there should be two angle brackets in the text strings:
  • Page 378:
    In the Adding Items to a ListBox at design time section, the RowSource property should be Sheet1!A1:A12 (not Sheet1A!:A12).
  • Page 401:
    Do not run the ccrpTimer timer control demo files from the CD-ROM. Attempting to do so will probably result in an error. Copy the workbook files (and the ccrpTmr.dll file) to your hard drive, and then run the demos from that location.
  • Page 458:
    The PivotCache object does not exist in Excel 97. Consequently, most of the examples require Excel 2000. These macros can, however, be rewritten for Excel 97. 
  • Page 467:
    The block of code that adds the pivot table fields is missing a statement. Consequently, the pivot tables are not accurate. The code block should be as follows:
' Add the fields
With PT.PivotFields(ItemName)
   .Orientation = xlDataField
   .Name = "Freq"
   .Function = xlCount 'NEW STATEMENT
End With
  • Page 480:
    In the block of code directly above Figure 17-3, the last statement should be:

    Application.DisplayAlerts = True
  • Page 490:
    As noted in the book, the GetChartRange function listed on page 491 has some limitations. I've since figured out a better way to determine a chart's data source. Click here for more information about a technique that uses a class module.
  • Page 507:
    The reference to Figure 17-16 should actually be to Figure 17-18, on Page 508. Figure 17-16 should not be there. 
  • Page 523:
    The second paragraph should read: The value of Cancel passed to the procedure is False. Your code can set Cancel to True, which cancels the printing.
  • Page 605:
    Two typos for the constant names fro the Position property. soBarFloating should be msoBarFloating. soBarPopUp should be msoBarPopUp.
  • Page 668:
    The sample file for What's This Help is missing from the CD-ROM. Sorry, it seems to have disappeared from my hard drive as well.
  • Page 685:
    The text states that the third argument for the GetSetting function is the value to use if the setting is not found. Actually, it's the fourth argument. 
  • Page 708:
    In Table 26-1, the second command listed should be Chdrive (not CurDrive).
  • Page 711:
    The "New Feature" note claims that the FileSearch object is new to Excel 2000. Not true. That object is also available in Excel 97.
  • Page 771:
    Regarding the last question on the page. The optional argument must be declared as a specific data type (a data type other than a Variant). The macro, as it appears in the book, will indeed appear in the macro list.

 

### End of known errors ###