What I am attempting to do is push data out to another excel file or
append. I am trying to use UNC paths. I guess my first quest is
...does VBA recognize UNC paths for files. It does for saving, but
doesn't look like it is for searches. I thought I had this working
weeks ago, but apparently not and I am trying to get this out this week.
I have an IF statement that searches for the file - if not found it goes
to add it. If the file is actually there I get a "do you want to
overwrite the existing file" and I don't...I want to append. Any help
is much appreciated.
By the way...I used the form for adding user data entry and although it
took me all day to get it to write back to the previous form...it is
working.
This is the search......
myDir = "\\gcoda58\Supplies\Supplies"
'myDir = CurDir
Set fsoFileSearch = Nothing
Set fsoFileSearch = Application.FileSearch
today = Now()
MyDate = DatePart("ww", today)
wbName = "Employee Upload_" & MyDate
With fsoFileSearch
.NewSearch
.LookIn = myDir
.Filename = wbName
.SearchSubFolders = True
.MatchTextExactly = True
.FileType = msoFileTypeExcelWorkbooks
This is the add and save
Workbooks.Add.Activate
ActiveWorkbook.SaveAs Filename:=myDir & "\" & wbName,
FileFormat:= _
xlNormal, Password:="xxxxxxx", WriteResPassword:="",
ReadOnlyRecommended:= _
False, CreateBackup:=False