rosshodges Posted December 28, 2002 Posted December 28, 2002 Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click If Label19.Text = "" Then MsgBox("Please enter Data") If Label19.Text Then Dim psInfo As New _ System.Diagnostics.ProcessStartInfo _ (Label19.Text) psInfo.WindowStyle = _ System.Diagnostics.ProcessWindowStyle.Normal Dim myProcess As Process = _ System.Diagnostics.Process.Start(psInfo) End If End Sub Depending on the value of the label I would like it to do different things. If Label19.Text = "" it shows the error message as it should but then continues to do the 2nd part. How can I teminate it after it has displayed the error message? I have tried end if but this doesnt work? Ross Quote "Drink wet cement and get really stoned"
*Experts* Volte Posted December 28, 2002 *Experts* Posted December 28, 2002 Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click If Label19.Text = "" Then MsgBox("Please enter Data") Else Dim psInfo As New _ System.Diagnostics.ProcessStartInfo _ (Label19.Text) psInfo.WindowStyle = _ System.Diagnostics.ProcessWindowStyle.Normal Dim myProcess As Process = _ System.Diagnostics.Process.Start(psInfo) End If End Sub Quote
rosshodges Posted December 28, 2002 Author Posted December 28, 2002 Thanks Quote "Drink wet cement and get really stoned"
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.