Socarsky
Well-known member
Private Sub RadioBtnRemove_CheckedChanged(sender As Object, e As EventArgs) Handles RadioBtnRemove.CheckedChanged If RadioBtnRemove.Checked = True Then strIlk = InputBox("Please enter a sort length string!") ElseIf strIlk = Nothing Then Exit Sub End If If strIlk.Trim().Length > 0 Then Label1.Text = "Orjinal string: " & strIlk strIkinci = strIlk.Remove(0, 3) Label2.Text = "After the process: " & strIkinci Else MessageBox.Show("Please provide a sort length string or try again!") End If End Sub
My ait is to get a string with InputBox but if change mind and usage the cancel button on InputBox then why function jump to line of last MessageBox, I used Exit Sub actually, something wrong the lines of codes.