View Single Post
 
Old 09-01-2018, 12:34 AM
Khwaja Khwaja is offline Windows 10 Office 2016
Novice
 
Join Date: Aug 2018
Posts: 12
Khwaja is on a distinguished road
Default

A little question. How do I reflect a cell value as part of the file name when I am saving it?

MyFileName = CurrentWB.Path & "\" & "Queen St Roster - " & Format(Now(), "dd-mm-yyyy") & ".csv"

Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:=MyFileName, FileFormat:=xlCSV, CreateBackup:=False, Local:=True
ActiveWorkbook.Close SaveChanges:=False
Application.DisplayAlerts = True

MsgBox "CSV file has been created "
Reply With Quote