Public Function WriteAppLog(StrLog As String) As String
    Dim LogFile As Integer
    Dim LFileName As String
    Dim FullPath As String

    LFileName = "\MyAPP-" & Format(Now, "mmddyyyy") & ".log"
    FullPath = app.path & "\Log" & LFileName

    If Dir(FullPath) = "" Then
        Dim NewFile As Integer

        NewFile = FreeFile

        Open FullPath For Output As #NewFile
Print #NewFile, "<+> ---------------< Application Log File v.1.0 >--------------- <+>"
        Print #NewFile, "==============================================="
        Close #NewFile
    End If

    LogFile = FreeFile
    Open FullPath For Append As #LogFile
        Print #LogFile, "[" & Now & "] = " & StrLog
    Close #LogFile

    WriteAppLog = StrLog
End Function

On 4/26/2010 1:38 PM, Ola wrote:



bagaimana menulis ketext file, dengan menulis pada baris terakhir
mohon infonya
oL@



Kirim email ke