jessiegeorgia
Board Regular
- Joined
- Aug 19, 2011
- Messages
- 78
Hi All,
I'm trying to save a file with a name based on a cell reference (which is a date that will rarely have any bearing on the current date so can't relate it to that).
I'm getting a runtime error 1004, method 'SaveAs' of object '_Workbook' failed on the last line of this code, can anyone help?
Sheets("Sheet1").Select
Dim FName As String
Dim FPath As String
FPath = "\\bradsrv01\CCsupport\P&A Team\Zoe\Temp Costs"
FName = Sheets("Sheet1").Range("E4").Text
ThisWorkbook.SaveAs Filename:=FPath & "\" & FName
The cell I'm referencing is populated by a data validation list with a custom format (mmm yy), is that as issue? Or is there just a better bit of code to do this???
Thanks in advance,
Jess
I'm trying to save a file with a name based on a cell reference (which is a date that will rarely have any bearing on the current date so can't relate it to that).
I'm getting a runtime error 1004, method 'SaveAs' of object '_Workbook' failed on the last line of this code, can anyone help?
Sheets("Sheet1").Select
Dim FName As String
Dim FPath As String
FPath = "\\bradsrv01\CCsupport\P&A Team\Zoe\Temp Costs"
FName = Sheets("Sheet1").Range("E4").Text
ThisWorkbook.SaveAs Filename:=FPath & "\" & FName
The cell I'm referencing is populated by a data validation list with a custom format (mmm yy), is that as issue? Or is there just a better bit of code to do this???
Thanks in advance,
Jess
Last edited: