Select Case Index
Case 0
Text1.Text = Str(Sin(ang * Val(Text1.Text)))
Case 1
Text1.Text = Str(Cos(ang * Val(Text1.Text)))
Case 2
If (Cos(Val(Text1.Text))) <> 0 Then
Text1.Text = Str(Sin(ang * Val(Text1.Text)) / Cos(ang * Val(Text1.Text)))
Else
MsgBox ("ILLEGAL. DIVIDE BY ZERO ")
End If
Case 5
Text1.Text = Str((Atn(Val(Text1.Text))) / ang)
End Select