how to create a log file in

Posted on 2009-02-17
Last Modified: 2012-05-06
I want to create a log file, how can I do this
Question by:SGUDAPAT
    LVL 8

    Assisted Solution


    That is a way to write to a file, and without more info of what exactly you want well, that is about all I can give ya.
    LVL 1

    Author Comment

    let me explain I have a window form in, User can add new customer using this form, but there is some type of check from the database while doing this, only if the requirements are met the user can add a customer, I already have a code to display error message box while doing this, I also want to create a log file with these messages, How do I do this?
    LVL 15

    Assisted Solution

    by:David L. Hansen
    LVL 4

    Accepted Solution

    LVL 4

    Expert Comment

    If mylog.FileExists("C:\mylog.log") = False Then
           Set createlog = mylog.CreateTextFile("C:\mylog.log", False)
           Set createlog = mylog.OpenTextFile("C:\mylog.log", ForAppending, False, TristateUseDefault)
       End If
    End Sub

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    Article by: jpaulino
    XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String ( Literal, only instead of starting and ending with w…
    Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    how to add IIS SMTP to handle application/Scanner relays into office 365.

    730 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now