Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click Dim firstNumber As Single = 0 Dim secondNumber As Single = 0 Dim totalDue As Single = 0 firstNumber = CSng(txt1.Text) secondNumber = CSng(txt2.Text) totalDue = firstNumber + secondNumber Label1.Text = DoFormat(totalDue) End Sub Private Function DoFormat(ByVal x As Single) As String '---this function accepts a Single number type and returns a formatted string Dim myResult As String = "" '---make 2 decimal places and show $ myResult = FormatCurrency(x, 2) Return myResult 'now send back the formatted string to the btnAdd_Click event so it can be shown in the label. End Function