and yet another way...
Code:Private Sub CommandButton1_Click() Dim dividend As String Dim divisor As String Dim info As String Dim Split As Integer ' Start with this. info = TextBox1.Text ' Find the Division. Split = InStr(1, info, "/", vbTextCompare) dividend = Left(info, Split - 1) divisor = Right(info, Split + 1) Label1.Caption = dividend / divisor End Sub




Reply With Quote