How to get current directory?
I have this code...How to get current directory?
Private Sub Command1_Click()
Dim fso, f, f1, fc, s, folderspec
folderspec = "c:\"
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(folderspec)
Set fc = f.Files
For Each f1 In fc
s = s & " " & f1.Name
s = s & Chr(13) + Chr(10)
Next
Text1.Text = s
End Sub
If thise file was placed in c:\windows\desktop\
how could i get it to show the current directory?
now i have pre coded it to show C:\ but if it aint in c:\ how can i make it find the current directory ???