At many places in the code, the unequals operator <> is missing. This is a typesetting error. The code is in all cases correct on the sample files.
Shift+_ should be: Shift + Cursor-Up
finally, _ should be: finally, Cursor-Right
4th line of code: If TypeName(ActiveSheet) <> "Worksheet" Then Exit Sub
For Each w In Application.Windows
If w.Parent.Name <> ActiveWorkbook.Name And w.Visible Then
...
With the optional parameter firstdayofweek you can specify, which weekday should be first. Thus, WeekdayName(1, firstdayofweek:=vbSunday) is "Sunday", independently of regional settings.
If Dir(file) <> "" Then ...
If isEmpty(x) Then NumberToText = "": Exit SubAlso on this page, the second last line in the listing should be:
x = Space(13 - Len(x)) + xThe code is correct on the CD (sample file Function.xls).
Dim y(3) '4 Elemente
y(i) = ...
Worksheets(1).Range("a1:d1") = y 'changes A1:D1
Dim x(9, 4) '10*5 Elemente
x(i,j)= ...
Worksheets(1).Range("a1:e10") = x 'changes cells A1:E10
If c.Controls(1).Caption <> "" And _ c.Controls(1).Caption <> "[Command not available]" And _ c.Controls(1).Caption <> "custom" Then
If lastmonth <> Month(dat) Then
19th line of code: If Dir(reportFile)<>"" Then 26th line of code: If Dir(templateFile)<>"" Then
14th line of code, If oldDir <> "" Then
17th line of code: If Err <> 0 Then
3rd line up from bottom of code: If ws.[b14] <> 0 And ws.[b14] <> "" Then
second code block, 4th line up from bottom: If Err <> 0 Then
5th line from bottom: If Err <> 0 Then
last line of page: If oldDir <> "" And LCase(oldDir) <> LCase(newDir) Then
10th line of code: If ptLayout(i,2) <> xlHidden Then
first code block, 3rd line from bottom: If LCase(prjName) <> "nwind.mdb" Then
menuPrint_Click(), 4th line down: If Err <> 0 Then
Sorry for the mistakes (and thank's to all who notify me about further errors)! Special thanks go to Rich A. Surace and Alan Craig, who pointed out most of the errors.
Last change 24th July 2002
Back to the book page at kofler.cc.
Back to the book page at apress.com.