Herfied,
The try/catch block statment seems to be out side the method body.
would i need to declare a separate class? if so, i'd like to be able to do
this without having to create a separate class in the form or class file.
Any help?
"Herfried K. Wagner [MVP]" wrote:
[color=blue]
> "Ronin" <Ronin@discussions.microsoft.com> schrieb:[color=green]
> > Where would i put it? with in the Sub New()?
> > i had a try catch block with in the Sub New():
> > If intC > 0 Then
> > MsgBox("A survey was already taken with your information.
> > If
> > you feel this is an error, please e-mail
Steve.M.Gavette@mail.sprint.com")
> > Try
> > Me.Dispose(True)
> > Catch ex As Exception
> > Me.Close()
> > End Try
> > End If
> >
> > and it still loads the form.[/color]
>
> \\\
> Public Class Form1
> Public Sub New()
> If...Then
> Throw New Exception(...)
> Else
> ...
> End If
> End Sub
> ...
> End Class
> ....
> Try
> Dim f As New Form1()
> Catch...
> ...
> End Try
> ///
>
> --
> M S Herfried K. Wagner
> M V P <URL:http://dotnet.mvps.org/>
> V B <URL:http://classicvb.org/petition/>
>
>[/color]