dcsimg
Results 1 to 5 of 5

Thread: [RESOLVED] How to add a message to the event log?

  1. #1

    Thread Starter
    Hyperactive Member BrianPaul's Avatar
    Join Date
    Aug 2007
    Posts
    294

    Resolved [RESOLVED] How to add a message to the event log?

    How do I add a message to the event log? I tried...

    App.LogEvent "Error Occured", vbLogEventTypeError

    It didn't give me an error, but there wasn't a message in my Win7 event log. What am I doing wrong?

  2. #2
    PowerPoster
    Join Date
    Feb 2006
    Posts
    20,706

    Re: How to add a message to the event log?

    Did you call App.StartLogging first?

  3. #3

    Thread Starter
    Hyperactive Member BrianPaul's Avatar
    Join Date
    Aug 2007
    Posts
    294

    Re: How to add a message to the event log?

    Quote Originally Posted by dilettante View Post
    Did you call App.StartLogging first?
    No, not sure how to do that. What do I need to give for the target?

  4. #4
    PowerPoster
    Join Date
    Feb 2006
    Posts
    20,706

    Re: How to add a message to the event log?

    Just pass it an empty string. The value is ignored when LogMode = vbLogToNT.

    These events will all be logged to the Application log, but only for compiled EXEs (not for IDE runs).

  5. #5

    Thread Starter
    Hyperactive Member BrianPaul's Avatar
    Join Date
    Aug 2007
    Posts
    294

    Re: How to add a message to the event log?

    Works great... THANKS!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width