Does anyone have experience creating a log file to centrally capture all error messages that users may see in a shared/network environment?
We have a somewhat complex, somewhat convoluted (I'd say) "system" here that is basically a series of MS Excel workbooks that mostly use the same central code, though some still are 100% on their own. Each of them when opened, create a new copy of themselves (so a template without actually starting as a template file - something I hope to one day change - have them actually start out as template files).
All sorts of odd issues can pop up due to varied circumstances, and it's difficult to remember/notate/track down everything unless users come to me directly when an issue occurs.
Currently, there's no error logging of any sort. Some procedures have error handling, others have none at all. It doesn't have to be fancy, but I'd like to capture several pieces of information whenever an error does occur and save those to a folder of text files or text file that is shared amongst all worksheets.
One thing I am concerned about is file locking. Say 2 users at different locations get errors at the same time, and try to write to the error log at the same time. Is there any good way to prevent or work around this issue?
I imagine the best way to go about doing this in VBA is to use the "freefile" methods of creating/writing to text files, but I've only done anything writing to text files probably no more than 2 or 3 times other than exporting data.
Thanks in advance for any ideas, references, etc.
"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57
We have a somewhat complex, somewhat convoluted (I'd say) "system" here that is basically a series of MS Excel workbooks that mostly use the same central code, though some still are 100% on their own. Each of them when opened, create a new copy of themselves (so a template without actually starting as a template file - something I hope to one day change - have them actually start out as template files).
All sorts of odd issues can pop up due to varied circumstances, and it's difficult to remember/notate/track down everything unless users come to me directly when an issue occurs.
Currently, there's no error logging of any sort. Some procedures have error handling, others have none at all. It doesn't have to be fancy, but I'd like to capture several pieces of information whenever an error does occur and save those to a folder of text files or text file that is shared amongst all worksheets.
One thing I am concerned about is file locking. Say 2 users at different locations get errors at the same time, and try to write to the error log at the same time. Is there any good way to prevent or work around this issue?
I imagine the best way to go about doing this in VBA is to use the "freefile" methods of creating/writing to text files, but I've only done anything writing to text files probably no more than 2 or 3 times other than exporting data.
Thanks in advance for any ideas, references, etc.
"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57