Wrox Home  

Topic: Visual Basic

VBScript: Programmer's Reference (0764543679) cover image

VBScript: Programmer's Reference

Susanne Clark, Antonio De Donatis, Adrian Kingsley-Hughes, Kathie Kingsley-Hughes, Brian Matsik, Erick Nelson, Piotr Prussak, Daniel Read, Carsten Thomsen, Stuart Updegrave, Paul Wilton
ISBN: 978-0-7645-4367-8
840 pages
December 1999
This title is out-of-print and not currently available for purchase from this site.

Do you think you've discovered an error in this book? Please check the list of errata below to see if we've already addressed the error. If not, please submit the error via our Errata Form. We will attempt to verify your error; if you're right, we will post a correction below.

ChapterPageDetailsDatePrint Run
28 Trim()

The code on page 28 will not remove any additional spacing. A better example of the code, which will remove any additional spacing and not allow empty strings, is:

Dim Greeting
Dim UserName
Dim TryAgain

TryAgain = "No"

UserName = InputBox("Please enter your name:")
UserName = Trim(UserName)
If UserName = "" Then
MsgBox "You must enter your name."
TryAgain = "Yes"
Greeting = "Hello, " & UserName & ", it's a pleasure to meet you."
End If

Loop While TryAgain = "Yes"

MsgBox Greeting

26-Jan-00 1
35 Organizing and Reusing Code

2nd Paragraph, 4th Sentence should read:

Before we start the loop, we initialize LoopCount with the numeric value of one.

19-Apr-00 1
76 What is a Literal?

The text should read:

A literal is any piece of data that appears in your code that is not stored as a variable or named constant...

09-Feb-00 1
140 WroxLogGroup.vbg

The code referred to as 'WroxLogGroup.vbg' is called 'page140.vbs' in the downloadable source code.

13-Jan-00 1
174 Using COM Components and Objects

The code should read:

<BLUE>Dim objFirstDocument
Dim objSecondDocument

' Instantiate the Document class from the Word COM
' component/server on the local machine
Set objFirstDocument = CreateObject("Word.Document")
' Let the second document reference the first document
Set objSecondDocument = objFirstDocument
' Show the instance of Word
objSecondDocument.ActiveWindow.Visible = True

' Destroy the first document after use
Set objFirstDocument = Nothing

<BLACK>NOTE: "<RED>Set<BLACK>" has been deleted from line 10 of the code.

15-Dec-99 1
202 RegExp (use of "\b" , word boundary)

Paragraph 3 should read:

"... Without this the word 'National' would be changed to 'Nationanal'. Second..."

19-Jan-00 1
615 FileSystemObject object

The syntax for the following methods of the FileSystemObject object are listed incorrectly in Appendix F. The correct syntax for these methods is:

object.CopyFile source, destination[, overwrite]

object.CopyFolder source, destination[, overwrite]

object.DeleteFile filespec[, force]

object.DeleteFolder folderspec[, force]

object.MoveFile source, destination

object.MoveFolder source, destination

where [] indicate optional parameters

10-Jan-00 1
Printer-Ready Version   Share This
With you wherever you go: pdf + ePub + kindle -- DRM-free