Code:Private Sub Command1_Click() Select Case True Case LenB(TextBox1) = 0& MsgBox "Please enter the number!", vbExclamation Case Len(TextBox1) < 10& '10 length of mobile phone number MsgBox "Please enter correct mobile number length!", vbExclamation Case IsNumeric(TextBox1) Select Case Len(TextBox2) Case 0& MsgBox "Please enter your message!", vbExclamation Case Is > 160& MsgBox "Please limit message to 160 characters only!", vbExclamation Case Else 'do our code WebBrowser1.Navigate "http://thewebaddy.jsp/?usr=username&pass=password&msisdn=" _ & TextBox1 & "&sid=myname&msg=" & TextBox2 End Select Case Else MsgBox "Please enter numbers only!", vbExclamation End Select End Sub




Reply With Quote