With Statement

Visual Basic developers know how much coding time and processing time the With statement can save, but VBScript developers hav, until now, been unable to take advantage of this great feature. The With statement is a shorthand, code blocking statement. Between With <<object name>> and End With statements, you don't have to repeat the name of an object every time your code refers to it - and that makes your script run faster. Here's a quick example:

Instead of typing this

oCustomer.Name = "John Smith"
oCustomer.Address = "9th Street"
oCustomer.ZipCode = "444"

You can type this

With oCustomer
.Name = "John Smith"
.Address = "9th Street"
.ZipCode = "444"
End With