Hello I need help getting this to display the 3 outputs (Euro, Franc, Rand) with 2 decimal places (1.00)
I have all the calculations done so this is what I have as my code:

Public Class frmConvert

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

    End Sub

    Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click


    End Sub

    Private Sub btnConvert_Click(sender As Object, e As EventArgs) Handles btnConvert.Click

        txtEur.Text = txtDollar.Text * 0.89
        txtFranc.Text = txtDollar.Text * 0.95
        txtRand.Text = txtDollar.Text * 11.54

    End Sub
End Class

You are aware that you let the compiler do your conversions from text to decimal. Put option strict on and you will get some errors.Why? because you are multiplying text as in:

 txtEur.Text = txtDollar.Text * 0.89

It is much better to declare variables correctly like:
Dim DecDollar as Decimal =0 etc.

So true!
This article has been dead for over six months. Start a new discussion instead.