file.vb
Dim pound As Integer
Dim dollar As Integer
Dim euro As Integer
Private Sub cmdConvert_Click()
If Option1.Value = True Then
Label2.Caption = "Dollar"
Text2.Text = Val(Text1.Text) / dollar
ElseIf Option2.Value = True Then
Label2.Caption = "Pound"
Text2.Text = Val(Text1.Text) / pound
ElseIf Option3.Value = True Then
Label2.Caption = "Euro"
Text2.Text = Val(Text1.Text) / euro
Else
MsgBox ("Select Conversion type")
End If
End Sub
Private Sub cmdRates_Click()
pound = Val(inputBox("Enter Rate of pound"))
dollar = Val(inputBox("Enter Rate of Dollar"))
euro = Val(inputBox("Enter Rate of euro"))
cmdConvert.Enabled = True
End Sub
Private Sub Form_Load()
cmdConvert.Enabled = False
End Sub