Hey,
I have two issues, I have written this to save my workbook as excel then save a sheet as csv using the cells in one sheet as the name of the files, I run it and select my destination but the files are not saved, secondly I need to remove the " that appear at the start and end of each line when I save the csv file any help is much appreciated.
I have two issues, I have written this to save my workbook as excel then save a sheet as csv using the cells in one sheet as the name of the files, I run it and select my destination but the files are not saved, secondly I need to remove the " that appear at the start and end of each line when I save the csv file any help is much appreciated.
Code:
Journalformatting()
'
' Journalformatting macro
'
Dim IntialName As String
Dim fileSaveName As Variant
InitialName = Sheets("Journal Sheet").Range("h6") & "_" & Sheets("Journal Sheet").Range("i6") & "_" & Sheets("Journal Sheet").Range("j6") & "_" & Sheets("Journal Sheet").Range("k6") & "_" & Sheets("Journal Sheet").Range("l6")
fileSaveName = Application.GetSaveAsFilename(InitialFileName:=InitialName, _
fileFilter:="Excel Files (*.xls), *.xls")
If fileSaveName <> False Then
MsgBox "Save as " & fileSaveName
Sheets("DirectUpload").Select
fileSaveName = Application.GetSaveAsFilename(InitialFileName:=InitialName, _
fileFilter:="CSV (*.csv), *.csv")
End If
End Sub
Last edited: