Está en la página 1de 2

Codigos pregunta 1

Private Sub CommandButton1_Click()

Dim monto, conver As Double

Dim usd, clp, euros As Double

monto = Val(TextBox1.Text)

'If OptionButton1.Value = True Then

'usd = monto * 651

'ElseIf OptionButton2.Value = True Then

'clp = monto * 1

'ElseIf OptionButton3.Value = True Then

'euros = monto * 760

'End If

If OptionButton4.Value = True And OptionButton1.Value = True Then

conver = monto

ElseIf OptionButton4.Value = True And OptionButton2.Value = True Then

conver = (monto / 651)

ElseIf OptionButton4.Value = True And OptionButton3.Value = True Then

conver = monto * (651 / 760)

ElseIf OptionButton5.Value = True And OptionButton1.Value = True Then

conver = monto * (760 / 651)

ElseIf OptionButton5.Value = True And OptionButton2.Value = True Then

conver = monto / 760

ElseIf OptionButton5.Value = True And OptionButton3.Value = True Then

conver = monto

ElseIf OptionButton6.Value = True And OptionButton1.Value = True Then


conver = monto * 651

ElseIf OptionButton6.Value = True And OptionButton2.Value = True Then

conver = monto

ElseIf OptionButton6.Value = True And OptionButton3.Value = True Then

conver = monto * 760

End If

TextBox2.Value = conver

'If usd > 0 Then

'conver = usd * 1

'If clp > 0 Then

'conver = clp * 651

'If euros > 0 Then

'conver = euros*

También podría gustarte