I'm using the following code to create a folder in docs & settings and put a data file there:
Workbooks.Add
Path = "C:\documents and settings\all users\application data\WAIL"
On Error Resume Next
GetAttr (Path)
If Err.Number <> 0 Then
MkDir Path
End If
On Error GoTo 0
Path = Path + "\WAILdb.xls"
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:=Path, FileFormat:=xlNormal, Password:="ItsASecret", WriteResPassword:="", ReadOnlyRecommended:=False, CreateBackup:=False
However, if a user has a windows installation that isn't located on C: (rare but it happens) is there a way to ensure access to the correct location?
Bookmarks