Hi all,
I'm trying to write a macro that saves a sheet as a unique name, varying upon the value of a specific field.
For example a name I would be after would be "JR Export MAR".
This is what I have so far, however it is't working.
Any Ideas?
Thanks,
Billy
I'm trying to write a macro that saves a sheet as a unique name, varying upon the value of a specific field.
For example a name I would be after would be "JR Export MAR".
This is what I have so far, however it is't working.
Code:
Sub Macro1()
'
' Macro1 Macro
'
'
Dim Filename1 As String
Filename1 = Workbooks("JR CSV Creator.xlsm").Sheets("Input").Range("A1").Value
Workbooks.Add
ChDir "M:\Palanning\Transport\Trucks"
ActiveWorkbook.SaveAs Filename:= _
"M:\Palanning\Transport\Trucks\JR Export & Filename1 & .xlsx", FileFormat:=xlsx _
, CreateBackup:=False
End Sub
Any Ideas?
Thanks,
Billy
Last edited: