Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to create LOG file for commands executed in VB..?
Hi All
Please help me out in creating log file for which ever commands are executed in Visual Basic during run time Regard Dayanan |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to create LOG file for commands executed in VB..?
can you please describe it a bit further?
Dayanand wrote: Hi All, Please help me out in creating log file for which ever commands are executed in Visual Basic during run time. Regards Dayanand |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to create LOG file for commands executed in VB..?
Add the procedure
Sub AddToLog(strMsg As String) Dim fid As Integer Const logfile = "c:\temp\vbalog.txt" fid = FreeFile() Open logfile For Append As #fid Print #fid, strMsg Close #fid End Sub then add calls to it where you need to record your code Open then Close to ensure file isn't lost if Excel crashes Kevin Beckham -----Original Message----- Hi All, Please help me out in creating log file for which ever commands are executed in Visual Basic during run time. Regards Dayanand . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to create LOG file for commands executed in VB..?
Hi Yogendra,
Thanx for u r response. Actually i have built an application in VB in which i am calling multilple call functions. Now my requirement is that, when ever i run my application.... a text file should be created on desktop and in thet current date and logging date has to be printed and then onwards which ever VB commands are going to be executed in my application, all those should be line by line logged to the text file. Hope u got my point. Could u please give me solution..? Regards Dayanand |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to create LOG file for commands executed in VB..?
Hi Kevin
Thanx for u r reply. But can u please guide me to create new text file every time i run my application and log the data. Which ever u have sent code will append the data to the existing log file. Is it possible to remove the old content and append new content or is it possible to create new text file..? Regard Dayanand |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to create LOG file for commands executed in VB..?
Dayanand,
Change the "For Append" to "For Output" in the Open statement. This will delete the contents of the file when it is opened. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Dayanand" wrote in message ... Hi Kevin, Thanx for u r reply. But can u please guide me to create new text file every time i run my application and log the data. Which ever u have sent code will append the data to the existing log file. Is it possible to remove the old content and append new content or is it possible to create new text file..?. Regards Dayanand |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro get executed twice | Excel Discussion (Misc queries) | |||
Lost Commands on Toolbar ie. File, View, etc. | Excel Discussion (Misc queries) | |||
file commands | Excel Worksheet Functions | |||
Deleting custom Commands from File Menu are nor saved next time w. | Excel Worksheet Functions | |||
Parameter Query executed from a Macro | Excel Programming |