Something like this maybe?


private Sub Command1_Click()
Select Case true
Case optAdd
Text3.Text = Val(Text1.Text) + Val(Text2.Text)
Case optSub
Text3.Text = Val(Text1.Text) - Val(Text2.Text)
Case optMul
Text3.Text = Val(Text1.Text) * Val(Text2.Text)
Case optDiv
Text3.Text = Val(Text1.Text) / Val(Text2.Text)
End Select
End Sub



Note to merrion: I used your if-then-elseif-to-select-case method you posted on http://www.vbcodelibrary.co.uk/board, and I like it!



Tom Cannaerts
[email protected]

Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook