lemonhalls
Technical User
Can you spot where I went wrong?
I'm getng a next without for error!
Thanks!!
excerpt...
_____________________
For i = 1 To 10
'if there is no previous copy of _DBReport(LastMonth) saved,
'then reporting.doc will be saved as _DBReporting(LastMonth)
If fIsFileDIR(newDir & "_DBReport" & lastMonth & i) = 1 Then
Next i
Else
MsgBox ("A copy of " & "_DBReport" & lastMonth & i - 1 & "is currently opened." _
& vbCrLf & "This version will be saved as _DBReport" & lastMonth & i)
aDoc.SaveAs FileName:=newDir & "_DBReport" & lastMonth & i
End If
I'm getng a next without for error!
Thanks!!
excerpt...
_____________________
For i = 1 To 10
'if there is no previous copy of _DBReport(LastMonth) saved,
'then reporting.doc will be saved as _DBReporting(LastMonth)
If fIsFileDIR(newDir & "_DBReport" & lastMonth & i) = 1 Then
Next i
Else
MsgBox ("A copy of " & "_DBReport" & lastMonth & i - 1 & "is currently opened." _
& vbCrLf & "This version will be saved as _DBReport" & lastMonth & i)
aDoc.SaveAs FileName:=newDir & "_DBReport" & lastMonth & i
End If