
Shane Partridge
Visual Basic 2013
The Code
​
Public Class Form75
​
'## Maths Functions ##
'## Built-In Mathematical Functions ##
'## The Log Function returns the natural Logarithm of a Number ##
​
Dim Number1 As Double
Dim Number2 As Double
Dim LogValue As Double
Dim DecFormat As String = "Log = ##.######"
​
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
​
Number1 = TextBox1.Text
LogValue = Math.Log(Val(Number1))
Label1.Text = Format(LogValue, DecFormat)
​
'## Assigning Value Label ##
'## Assigning Variable to Label alternative Formatting ##
​
Number2 = TextBox2.Text
Label2.Text = Format(Math.Log(Val(Number2)), DecFormat)
​
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
​
TextBox1.Text = ""
TextBox2.Text = ""
Label1.Text = ""
Label2.Text = ""
​
End Sub
​
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
​
Form73.Show()
Me.Hide()
​
End Sub
End Class
​
​
