With statement is not a loop, but can be as useful as a loop. In this article, we will discuss about the
The syntax for the width statement is given below.
With object [Statements] End With
Example: With Statement
In the following example, we will use
With statement to set some properties of a
Private Sub Command1_Click() With Text1 .Width = 2500 .Height = 800 .Text = "NotesforMsc" End With End Sub
In the above example, we can see that the properties of a textbox is changed using
With statement when a user clicks the
Not only textbox control, we can change many other properties of Visual Basic 6 control objects.
Output: With Statement
The output of the above program is given below.