Hi everyone,
I have written a code in order to produce a currency converter. My program will be designed to convert pounds into euros using visual basic programming. I have two text boxes and one button(convert)
I have written the code, but i have come across alot of errors. Can anyone help me? Here is my code in full:
[CODE=vbnet]Public Class Form1
Private Sub Form1_Load(ByVa l sender As System.Object, ByVal e As System.EventArg s) Handles MyBase.Load
'Converts British Pounds into Euros'
Dim Pounds As Decimal
Dim Euro As Decimal
Dim Exrate As String
Dim amount, total As Decimal
End Sub
Private Sub Label1_Click(By Val sender As System.Object, ByVal e As System.EventArg s) Handles label1.Click, Pounds.Click
InputData(By Ref Pounds As Decimal
'Enter amount in British Pounds'
amount = Pounds(Add.Text )
End Sub
Private Sub TextBox2_TextCh anged(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles TextBox2.TextCh anged
Function Pounds(ByVal As Decimal)As Decimal
'Convert British Pounds to Euros.
Return (total = amount * 1 / 1.4)
End Function
Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As System.EventArg s) Handles Button1.Click
If Text = "Pounds" = txt.Pounds.Text Then
total = amount * 1 / 1.4
Convert button visual = True
Else
textResult.text = "Incorrect Value Please try again."
End If
End Sub
End Class[/CODE]
I have written a code in order to produce a currency converter. My program will be designed to convert pounds into euros using visual basic programming. I have two text boxes and one button(convert)
I have written the code, but i have come across alot of errors. Can anyone help me? Here is my code in full:
[CODE=vbnet]Public Class Form1
Private Sub Form1_Load(ByVa l sender As System.Object, ByVal e As System.EventArg s) Handles MyBase.Load
'Converts British Pounds into Euros'
Dim Pounds As Decimal
Dim Euro As Decimal
Dim Exrate As String
Dim amount, total As Decimal
End Sub
Private Sub Label1_Click(By Val sender As System.Object, ByVal e As System.EventArg s) Handles label1.Click, Pounds.Click
InputData(By Ref Pounds As Decimal
'Enter amount in British Pounds'
amount = Pounds(Add.Text )
End Sub
Private Sub TextBox2_TextCh anged(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles TextBox2.TextCh anged
Function Pounds(ByVal As Decimal)As Decimal
'Convert British Pounds to Euros.
Return (total = amount * 1 / 1.4)
End Function
Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As System.EventArg s) Handles Button1.Click
If Text = "Pounds" = txt.Pounds.Text Then
total = amount * 1 / 1.4
Convert button visual = True
Else
textResult.text = "Incorrect Value Please try again."
End If
End Sub
End Class[/CODE]
Comment