![]() |
Open a log file
I have a script that runs with in side of excel. If there are errors it writes them to a a text file that is named file.log. I want to open this log file at the end of the script but I can't seem to get it to work. Any help would be great thank
|
Open a log file
Jim,
Try using the Shell command to open Notepad. Shell "notepad.exe c:\temp\test.log", vbNormalFocus -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Jim" wrote in message ... I have a script that runs with in side of excel. If there are errors it writes them to a a text file that is named file.log. I want to open this log file at the end of the script but I can't seem to get it to work. Any help would be great thanks |
Open a log file
What do you mean by open it? Do you want to open it in a spreadsheet
(workbooks.Open ). Do you want to open it in Notepad (use the shell command)? -- Regards, Tom Ogilvy "Jim" wrote in message ... I have a script that runs with in side of excel. If there are errors it writes them to a a text file that is named file.log. I want to open this log file at the end of the script but I can't seem to get it to work. Any help would be great thanks |
Open a log file
This file might be a help:
http://www.bygsoftware.com/examples/...s/log_file.zip It shows how to create a log file for your projects as you work. Add this into your code while debugging, or use it in projects to audit user activity. It's in the "Administration Utilities" section on page: http://www.bygsoftware.com/examples/examples.htm The code is open and commented. -- Regards Andy Wiggins www.BygSoftware.com Home of "Save and BackUp", "The Excel Auditor" and "Byg Tools for VBA" "Jim" wrote in message ... I have a script that runs with in side of excel. If there are errors it writes them to a a text file that is named file.log. I want to open this log file at the end of the script but I can't seem to get it to work. Any help would be great thanks |
All times are GMT +1. The time now is 12:28 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com