Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to open a 82 KB XLSM file due to "Too many different cellformats" & "Converter failed to open the file." errors. Phillip Pi Excel Discussion (Misc queries) 0 April 23rd 09 08:53 PM
Unable to open a 82 KB XLSM file due to "Too many different cellformats" & "Converter failed to open the file." errors. Phillip Pi Setting up and Configuration of Excel 0 April 23rd 09 08:53 PM
excel 2003 saved file will not open without a blank workbook open Bob Excel Discussion (Misc queries) 4 November 11th 06 04:24 PM
In Excel - Use Windows Explorer instead of File Open to open file KymY Excel Discussion (Misc queries) 1 August 5th 06 09:59 PM
How do I stop Excel from closing the open file each time I open a. Welsin Setting up and Configuration of Excel 3 January 8th 05 11:16 PM


All times are GMT +1. The time now is 12:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"