Hi All,
I asked a similar question on this thread but have managed to get most of the problem solved. The only bit I am struggling with now is how to copy the entire worksheet into a new workbook and save the file to a specific directory with the following filename format ("exceptions191011 - ie. the word exceptions followed by today's date in ddmmyy format).
Here is what I've got so far:
Thanks in advance for any suggestions
EDIT - This now seems to work - could someone please help me add the following condition that if a file already exists with that name then to bring up an error message stating the file already exists?
2ND EDIT - As well as save the new workbook, it appears to close the original workbook - can I stop this?

I asked a similar question on this thread but have managed to get most of the problem solved. The only bit I am struggling with now is how to copy the entire worksheet into a new workbook and save the file to a specific directory with the following filename format ("exceptions191011 - ie. the word exceptions followed by today's date in ddmmyy format).
Here is what I've got so far:
Code:
Sub SaveAs()
Dim FName As String
Dim FPath As String
FPath = "G:\Exceptions\"
FName = "Exceptions" & Format(Date, "ddmmyy") & ".xls"
Sheets("DataSort").Copy
ThisWorkbook.Sheets("Sheet1").SaveAs Filename:=FPath & "\" & FName
End Sub
Thanks in advance for any suggestions
EDIT - This now seems to work - could someone please help me add the following condition that if a file already exists with that name then to bring up an error message stating the file already exists?
2ND EDIT - As well as save the new workbook, it appears to close the original workbook - can I stop this?
Last edited: