SyntaxNew type[(arglist)]
DescriptionThe New keyword creates a new instance of type. The New keyword is often used in assignment statements or to create a new onetime instance to pass as a parameter to a function. someVariable = New InterestingClass New instances of objects are also created as part of the Dim statement syntax. See the Dim Statement entry in this chapter for additional information. A completely different use of the New keyword is in the building of constructors. If you create a class Sub procedure and give it the name New, it becomes a class constructor. Usage at a Glance
See AlsoDim Statement, Sub Statement |