Here is my code:
Sub SaveToSidonna()
Dim wb As Workbook, myFileName As String, myVal As Long, myMax As Long
Dim strPath As String, fname As String, i As Integer
If MsgBox("Have you printed your worksheets yet?", vbYesNo) = vbNo Then Exit Sub
Application.ScreenUpdating = False
Sheets("ESTIMATING").Select
ActiveWorkbook.Save
strPath = "\\Sidonna\c\Estimating\"
strPath2 = "\\5.121.152.146\Estimating\"
fname = Dir(strPath & Range("B11") & "*.xls")
If fname = "" Then
myFileName = Range("b11").Value & "1.xls"
Else
Do While fname <> ""
myVal = Val(Replace(Replace(fname, ".xls", ""), Range("b11").Value, ""))
myMax = WorksheetFunction.Max(myMax, myVal)
fname = Dir()
Loop
myFileName = Range("b11").Value & myMax + 1 & ".xls"
End If
On Error Resume Next
ThisWorkbook.SaveCopyAs strPath & myFileName
ThisWorkbook.SaveCopyAs strPath2 & myFileName
End Sub
What I need it to do is try to SaveCopyAs to the strpath & myFileName , if it does not find this path ( no error message) then save to SaveCopyAs strpath2 & myFileName
Michael