shrug-l: Log Files

Morgan, John D. jmorgan at admin.fsu.edu
Tue Apr 10 14:26:12 EDT 2007


Hello, 

The following might work:

Sub FileIOExample()
  ' first, create the FileSystemObject
  Dim pFileSystem As Object
  Dim pFile As Object
  Set pFileSystem = CreateObject("Scripting.FileSystemObject")
  Set pFile = pFileSystem.CreateTextFile("c:\textfile.txt", True)
  UserName = Environ("USERNAME")
  ' write few lines into the file
  pFile.WriteLine "line number one" & " " & UserName
  pFile.WriteLine "line number two" & " " & date()
  pFile.WriteLine "line number two" & " " & time()
  ' close the file
  pFile.Close
End Sub

Cheers, 

Derek


-----Original Message-----
From: shrug-l-bounces at lists.dep.state.fl.us
[mailto:shrug-l-bounces at lists.dep.state.fl.us] On Behalf Of Casey
Lindemuth
Sent: Tuesday, April 10, 2007 1:53 PM
To: jgoyings at nefrc.org; shrug-l at lists.dep.state.fl.us
Subject: shrug-l: Log Files

Does anyone in the community know of a VBA code that will create a log
file 
for an MXD?  I'm looking for VBA code that will write the user, time,
date, 
and additional comments (optional) to a text file.

Thanks in advance,

Casey Lindemuth, GISP
Tampa FL


_______________________________________________
SHRUG-L mailing list
SHRUG-L at lists.dep.state.fl.us
http://lists.dep.state.fl.us/mailman/listinfo/shrug-l


More information about the SHRUG-L mailing list