Temporary Directory
Well the most liked directory to take up so much space and yet people start
deleting files from their Windows Directory (hmmmm....)! So heres another way
of retrieving the Temporary Directory:
Private Declare Function GetTempPath Lib "kernel32" Alias "GetTempPathA"
(ByVal nBufferLength As Long, ByVal lpBuffer As String) As Long
Private Const MAX_LENGTH = 512
Public Function GetTempDirectory() As String
Dim s As String
Dim c As Long
s = Space$(MAX_LENGTH)
c = GetTempPath(MAX_LENGTH, s)
If c > 0 Then
If c > Len(s) Then
s = Space$(c + 1)
c = GetTempPath(MAX_LENGTH, s)
End If
End If
GetTempDirectory = IIf(c > 0, Left$(s, c), "")
End Function
Okay time to wrap things up... if you lazy to cut/copy/paste all the code i've
done the work for your convienence. The next part as all the code wrapped in
a module so you can easily reference any path you want!