Hi
I currently use the code below to save a XLSB worksheet to same file location and add the date of save to the File Name, I now require the file to be converted to a CSV and saved in same file path with Date added, is this possible please
Regards
Jeremy
I currently use the code below to save a XLSB worksheet to same file location and add the date of save to the File Name, I now require the file to be converted to a CSV and saved in same file path with Date added, is this possible please
VBA Code:
Sub Save_Workbook()
Dim FullPath As String
Dim temp As String
Dim extn As String
Dim i As Integer
FullPath = ActiveWorkbook.FullName
If InStr(1, FullPath, Format(Now(), "dd-mm-yyyy")) >= 1 Then GoTo skip
i = InStr(1, FullPath, ".")
temp = Left(FullPath, i - 1)
extn = Mid(FullPath, i, (Len(FullPath) - i) + 1)
FullPath = temp & " " & Format(Now(), "dd-mm-yyyy") & extn
skip:
ActiveWorkbook.SaveAs Filename:= _
FullPath _
, FileFormat:=xlExcel12, CreateBackup:=False
End Sub
Regards
Jeremy