With Statement
- Updated2024-09-12
- 1 minute(s) read
VBScript Language Directory > Objects and Classes > With Statement
With Statement
You can use the With statement to execute a number of statements on a single object.
In a With statement, every valid statement is allowed. However, you cannot change the modified object.
With Object Statements End With
| Object | Name of an object or function that returns an object. |
| Statements | One or more statements that are executed on the object. |
| Note Within the With statement, DIAdem neither supports CodeCompletion nor SmartInfo for statements that do not refer to the given object. |
The following example changes several properties of an object:
With MyCuboid .Height = 2 .Width = 4 .Length = 5 End With
Related Topics
Do While...Loop | Do...Loop Until | Exit | For...Next | For Each...Next | If...Then...Else | Select Case...Case...End Select | While...Wend | With