how about storing the values of these variables in some global variable holding a dictionary, containing all the info you'd want in an error report? you'd have to remove them also when you were going out of scope, so that they didn't get reported to you in a place where they really didn't exist, so it's some trouble to do it like this, but it would allow you to tailor what's being reported at any given location by what you add (and remove) from this global dictionary. Chip
_____ From: J.J. Meddaugh [mailto:[email protected]] Sent: Friday, January 08, 2010 2:02 PM To: [email protected] Subject: Error Reporting I want to append details to an error report, but the variables I would be sending are only active in certain instances. I tried setting up a function like this Function ErrorData() if not filename is nothing then ErrorData = ErrorData & "Filename: " & filename & vbCrLf end if if not parms is nothing then ErrorData = ErrorData & "parms: " & parms & vbCrLf end if End Function But it still generates an error at script launch because the variables aren't active. Is there a better way to do this, or should I just put the append info right by the part of the script where these variables are active? That method seems cluttered. J.J. Meddaugh - ATGuys.com A premier Licensed Code Factory and KNFB Reader distributor
