Errata

Programming Excel with VBA and .NET

Errata for Programming Excel with VBA and .NET

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
1
Section 5.3 Create Properties

In code example of Property Let Recipients(value As String)
the statement:
If Mid(value, Len(value) -1, 1) = ";" Then
should be
If Mid(value, Len(value), 1) = ";"

Regards,
Andrew Chien

Anonymous  Jul 07, 2008 
5.6
5.6 Collect Object, sub TestInitializeCollection( )

There's a typo in the subroutine,
was
Set colMessages = New Messages
should be
Set m_Messages = New Messages

Best Regards,
Andrew
-----------------------------------------
' TestMessage module
Dim m_Messages As Messages

Sub TestInitializeCollection( )
' Intialize the Messages collection.
Set colMessages = New Messages
' Create some messages

Anonymous  Jul 11, 2008 
Printed Page 8
code at bottom (macro name)

Sub Macro1()
should be:
Sub Macro1a()

and

Macro1 Macro
should be:
Macro1a Macro

Anonymous   
Printed Page 42
last Public Sub procedure

Public Sub CubeRoot2(...

should be:
Public Sub GetCubeRoot2(...

and I think that will be fine to add a new version of the
Sub TestGetCubeRoot2(),

like this:
Sub TestGetCubeRoot2()
Dim x As Double
Dim result As Double
x = 42
GetCubeRoot2 x, result
Debug.Print result
End Sub

Anonymous   
Printed Page 69
third paragraph

"...but UBound returns the number of elements in the array, not the maximum index of
the array..."

This is false. The use and explanation of arrays (pp 59-62) contain a number of
misleading examples. But the above statement is just plain wrong. For example, an
array A(4), given Base 0, has five elements (0,1,2,3,4), and a UBound of 4. An array
A(4 To 8) has five elements (4,5,6,7,8), and a Ubound of 8.

Anonymous   
Printed Page 79
First codes sample on page

The code in the book reads:

remainder = numerator Mod denominator
' Return the result
IntegerMath = "Result is " & quotient & " remainder " & denominator

it should read:
remainder = numerator Mod denominator
' Return the result
IntegerMath = "Result is " & quotient & " remainder " & remainder

and the same error exists in the sample file.

NYDean  Jul 13, 2009 
Printed Page 92
2nd paragraph

"You should use the Double data type when measuring performance" - Timer returns a Single datatype, so surely a Single data type would suffice?

Anonymous   
Printed Page 152
Section 5.3 Create Properties

In code example of Property Let Recipients(value As String)
the statement:
If Mid(value, Len(value) -1, 1) = ";" Then
should be
If Mid(value, Len(value), 1) = ";"

Anonymous   
Printed Page 169
5.6 Collect Object, sub TestInitializeCollection( )

There's a typo in the subroutine,
was
Set colMessages = New Messages
should be
Set m_Messages = New Messages

Anonymous   
Printed Page 947
Figure 25-10

In Figure 25-10 "Microsoft Office 11.0 Object Library" is highlighted to show how to
add reference to Microsoft Excel Object Library. This should be "Microsoft
Excel 11.0 Object Library".

Anonymous