Hi Folks
I'm trying to get the following code to work but keep running into a Run-time eorror '1004' error. Can anyone please give me some guidance as to where I'm going wrong?
Code
Sub SaveAs2()
Dim part1 As String
Dim part2 As String
Dim part3 As String
part1 = Range("C5").Value
part2 = Range("C7").Value
part3 = Range("C11").Value
ActiveWorkbook.SaveAs Filename:= _
"FilePath Here\" & part1 & " " & part2 & part3, FileFormat:= _
xlOpenXMLWorkbookMacroEnabled, CreateBackup:=FalseEnd Sub
I've also tried seperating the 3 parts with hyphens just in case:
Code
S
ub SaveAs2()
Dim part1 As String
Dim part2 As String
Dim part3 As String
part1 = Range("C5").Value
part2 = Range("C7").Value
part3 = Range("C11").Value
ActiveWorkbook.SaveAs Filename:= _
"filepath here" & part1 & "-" & part2 & "-" & part3 & "-", FileFormat:= _
xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
End Sub
Display More
But no joy on either. I'd really appreciate some help please?
Kind regards
DezB