‘PROGRAMA CONVERSOR DE MONEDA’

 

Dim ent As Double

Dim sal As Double

 

Dim pes As Double

Dim eur As Double

Dim dol As Double

Dim lib As Double

Dim mar As Double

Dim ff As Double

Dim fs As Double

Dim li As Double

 

 

Dim entrada As String

 

Private Sub Command1_Click()

On Error Resume Next

Label1.Caption = Format(CStr(Text1.Text) * ent / sal, "0.000")

 

End Sub

 

Private Sub Form_Load()

pes = 1

eur = 166.386

dol = 196.05

lib = 270.6666

mar = 85.0718

ff = 25.3654

fs = 109.1471

li = 0.0859313

ent = 1

sal = 1

entrada = "0"

Text1.Text = entrada

Label1.Caption = "0"

Option1(0).Value = False

Option2(0).Value = False

 

End Sub

 

Private Sub Option1_Click(Index As Integer)

Select Case Index

Case 0

Label4.Caption = "PTS": ent = pes: Command1_Click

Case 1

Label4.Caption = "EUR": ent = eur: Command1_Click

Case 2

Label4.Caption = "$": ent = dol: Command1_Click

Case 3

Label4.Caption = "LE": ent = lib: Command1_Click

Case 4

Label4.Caption = "DM": ent = mar: Command1_Click

Case 5

Label4.Caption = "FF": ent = ff: Command1_Click

Case 6

Label4.Caption = "FS": ent = fs: Command1_Click

Case 7

Label4.Caption = "L": ent = li: Command1_Click

 

Case Else

End Select

Label2.Caption = Str(ent)

End Sub

 

Private Sub Option2_Click(Index As Integer)

Select Case Index

Case 0

 

Label5.Caption = "PTS": sal = pes: Command1_Click

Case 1

Label5.Caption = "EUR": sal = eur: Command1_Click

Case 2

Label5.Caption = "$": sal = dol: Command1_Click

Case 3

Label5.Caption = "LE": sal = lib: Command1_Click

Case 4

Label5.Caption = "DM": sal = mar: Command1_Click

Case 5

Label5.Caption = "FF": sal = ff: Command1_Click

Case 6

Label5.Caption = "FS": sal = fs: Command1_Click

Case 7

Label5.Caption = "L": sal = li: Command1_Click

 

Case Else

End Select

Label3.Caption = Str(sal)

End Sub