Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Log errors

Status
Not open for further replies.

DrSmyth

Technical User
Jul 16, 2003
557
GB
Hi, I run some scheduled tasks on my PC using excel/word and vba, that occasionally throw up an error. In order to enable the other scheduled tasks to run I get the error handler to quit the application in the event of these errors.

The problem is that I need to start logging these errors and am not sure how to do it, is there a way of generating an error log?
 
How about in your error trap, writing to a text document or a excel spreadsheet the error ?

Chance,

F, G + HH
 
hit enter a bit too soon,

remember in your error trap you have

err.number
err.description etc

Add a time stamp and hey presto

Chance,

F, G + HH
 
How would you export this to a log?
 
Well,

If you were doign it to a excel file , then look at createobject
Sheet Object
Cell Reference

If you are doing it to a text file then

have a look at freefile and print


Chance,

F, G + HH
 
Cheers I'll take a look at these things
 
you might find the following article helpful

Chance,

F, G + HH
 
Thanks for your help chance. I'll let you know how I get on..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top