VBA - Write To File - Simple Log File! 
Author Message
 VBA - Write To File - Simple Log File!

Hi,

I'd like to create a simple log file that records some of the Key Events
that take place in my database during the day.

Could someone provide a simple sample of how to do this, as i wouldn't know
where to strart!

Thanks

Jado



Mon, 16 Aug 2004 18:49:39 GMT  
 VBA - Write To File - Simple Log File!
Hi Jado,
Here is how to write to a file:

Dim strOut As String
strOut = "test"
Open "C:\myLog.txt" For Append As #1
Print #1, strOut
Close #1

HTH
Dan Artuso, MVP

Quote:

> Hi,

> I'd like to create a simple log file that records some of the Key Events
> that take place in my database during the day.

> Could someone provide a simple sample of how to do this, as i wouldn't know
> where to strart!

> Thanks

> Jado



Mon, 16 Aug 2004 20:14:10 GMT  
 VBA - Write To File - Simple Log File!
Thanks Alot Dan!

To be honest, i can belive how simple the process is!
i thought i'd need Declairations and calls to "Kernal32" and all sorts..

I'm now writing Successful LogFiles for all Logable Events! :-)

Thanks

Jado


Quote:
> Hi Jado,
> Here is how to write to a file:

> Dim strOut As String
> strOut = "test"
> Open "C:\myLog.txt" For Append As #1
> Print #1, strOut
> Close #1

> HTH
> Dan Artuso, MVP


> > Hi,

> > I'd like to create a simple log file that records some of the Key Events
> > that take place in my database during the day.

> > Could someone provide a simple sample of how to do this, as i wouldn't
know
> > where to strart!

> > Thanks

> > Jado



Mon, 16 Aug 2004 20:52:27 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Making an Event Log Message File in VB (NOT WRITING TO THE EVENT LOG)

2. binary log file instead of text log file

3. Writing log file.....

4. Write to a log file using a new thread

5. Write URLs to a log file?

6. Creating And Writing To An Error Log File

7. Writing Log Files on Shared Server

8. Writing to log files

9. Creating a log file, then writing folder list to it

10. write log file as system during logon?

11. writing a log file problem

12. ASP writing to HTML log file...

 

 
Powered by phpBB® Forum Software