ChubbyArse
Newcomer
- Joined
- Jun 10, 2003
- Messages
- 19
Hi All.
I have a code snippett, that I'd like to use the with statement, to make it more readable.
If frmComponentSearchForm Is Nothing Then
frmComponentSearchForm = New frmPartSearch
frmComponentSearchForm.MdiParent = Me.ParentForm
frmComponentSearchForm.Show()
Else
frmComponentSearchForm.Show()
End If
How would I use the with statement, beacuse as far as I know I can't use the = operator with the object which is the subject of the with:
With frmComponentSearchForm
If withobject Is Nothing Then
withobject = New frmPartSearch
.MdiParent = Me.ParentForm
.Show()
Else
.Show()
End If
End With
Is there a better may of doing this?
Thanks Very Much!
I have a code snippett, that I'd like to use the with statement, to make it more readable.
If frmComponentSearchForm Is Nothing Then
frmComponentSearchForm = New frmPartSearch
frmComponentSearchForm.MdiParent = Me.ParentForm
frmComponentSearchForm.Show()
Else
frmComponentSearchForm.Show()
End If
How would I use the with statement, beacuse as far as I know I can't use the = operator with the object which is the subject of the with:
With frmComponentSearchForm
If withobject Is Nothing Then
withobject = New frmPartSearch
.MdiParent = Me.ParentForm
.Show()
Else
.Show()
End If
End With
Is there a better may of doing this?
Thanks Very Much!