Skip to content
Home ยป VB 6 – Log() Function

VB 6 – Log() Function

    In this article, you will learn about Log() function. The Log function takes the Logex of a number x. To know the correct log value of a number you must refer to a log table.

    For example, logex = loge10 = 2.302585

    Example Program: Log() Function

    Private Sub Command1_Click()
    Dim Num As Double, Result As Double
    Num = Val(Text1.Text)
    Result = Log(Num)
    Text2.Text = Str(Result)
    End Sub
    Private Sub Command2_Click()
      Text1.Text = ""
      Text2.Text = ""
    End Sub

    Output: Log() Function

    Output - Log() Function
    Figure 1 – Output – Log() Function