You can overload the constructor in a class:
Public Class TestClass
Public Sub New()
'Do nothing here
End Sub
Public Sub New(ByVal x As String)
'Set property here
_x = x
End Sub
'Field declaration
Private _x As String
'Proeprty declaration
Public Property X() As String
Get
Return _x
End Get
Set(ByVal Value As String)
_x = Value
End Set
End Property
End Class

Signature
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************
> Hi,
>
[quoted text clipped - 9 lines]
> Many thanks
> Simon Whale
Cowboy (Gregory A. Beamer) - MVP - 21 Sep 2005 13:34 GMT
As a follow up, since it may not be completely obvious that a form is just
another type of class. Here is a form constructor overloaded:
Public Sub New(ByRef x As String)
'Should always call default constructor
Me.New()
'Set field
_x = x
End Sub
To instantiate the form:
Dim f As New Form2("x")
f.Show()

Signature
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************
> You can overload the constructor in a class:
>
[quoted text clipped - 35 lines]
> > Many thanks
> > Simon Whale