With object
[statements]
End With
The With statement allows you to perform a series of commands or statements on a particular object without again referring to the name of that object. With statements can be nested by putting one With block within another With block. You must fully specify any object in an inner With block to any member of an object in an outer With block.
' This sample shows some of the features of user defined types and ' the with statement. Type type1 a As Integer d As Double s As String End Type Type type2 a As String o As type1 End Type Dim type1a As type1 Dim type2a As type2 Sub Main () With type1a .a = 65 .d = 3.14 End With With type2a .a = "Hello, world" With .o .s = "Goodbye" End With End With type1a.s = "YES" MsgBox type1a.a MsgBox type1a.d MsgBox type1a.s MsgBox type2a.a MsgBox type2a.o.s End Sub