Hi,
I have the following issue. I want to export a specific worksheet in CSV format but I want the macro to open a Save As dialog.
Actually I have found a macro that exports the sheet in PDF format and it works great. Can someone adjust the following macro in order to export also in CSV format? I want to copy the whole worksheet and paste only values in the new CSV, not formulas.
The idea is to give the user the option to export in either CSV or PDF format, using 2 different macros.
Thanks!
ps: I don't know
Sub Export_PDF()
Sheets("(3) Google Calendar Setup").Select
pdfName = ActiveSheet.Range("T1")
ChDir "C:\" 'This is where you set a default file path.
fileSaveName = Application.GetSaveAsFilename("Hansons Marathon Method - Training Calendar", _
fileFilter:="PDF Files (*.pdf), *.pdf")
If fileSaveName <> False Then
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
fileSaveName _
, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=True
End If
MsgBox "File Saved to" & " " & fileSaveName
End Sub
Bookmarks