'This code assumes that cn is a valid and open ADO connection object, and that myCmd is a valid ADO command object.
'Using the with statement
With myCmd
.ActiveConnection = cn
.CommandText = "delete from customers"
.Execute
End With
'Not using the with statement
myCmd.ActiveConnection = cn
myCmd.CommandText = "delete from customers"
myCmd.Execute