Solved

App.StartLogging method is not working.

Posted on 1998-12-10
5
733 Views
Last Modified: 2013-11-26
When I try to use the App.startlogging method and the app.logevent to log events happening in my application, I get no results.  I then began to use the App.logmode property to check to see if the app.startlogging method was working, and it does not seem to be producing any changes.  For example...

Using the following code

Msgbox app.logmode
msgbox app.startlogging "Testfile.log", 2
msgbox app.logmode

For each message box, I get a zero result.  I figure I'm doing something stupid, but don't have any documentation that mentions error logging.
0
Comment
Question by:jsuper
5 Comments
 
LVL 3

Expert Comment

by:jjbyers
ID: 1449333
You need to use the logevent method of the app object.
0
 
LVL 1

Author Comment

by:jsuper
ID: 1449334
In the original question I mention that I use the logevent method to try to post messages to the log.  The problem is that those messages are never getting into the log because my original attempt to turn logging on failed.

0
 
LVL 4

Expert Comment

by:chabaud
ID: 1449335
Are u using win95 or winNT ?
0
 
LVL 3

Accepted Solution

by:
covington earned 50 total points
ID: 1449336
Compile your app. It will work fine.


INFO: App.LogEvent Only Logs in Compiled Applications
Article ID: Q161306
http://support.microsoft.com/support/kb/articles/q161/3/06.asp
 


--------------------------------------------------------------------------------

The information in this article applies to:
Microsoft Visual Basic for Windows Learning, Professional, and Enterprise Editions, versions 5.0, 6.0
Microsoft Visual Basic Control Creation, Learning, Professional, and Enterprise Editions, for Windows, version 5.0


SUMMARY
In Microsoft Visual Basic, Event Logging allows an application to add information to either a user-defined file or the Microsoft Windows NT Event Log when a user-defined criteria is met.

This functionality is only available when running a compiled application. If you attempt to use the logging methods while in the Microsoft Visual Basic development environment, the logging methods will be ignored.
0
 
LVL 1

Author Comment

by:jsuper
ID: 1449337
Thanks for the info...   That did the trick!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

708 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

17 Experts available now in Live!

Get 1:1 Help Now