Stop searching. Start learning and developing your excel skills.
Macro
VBA
Formula
Function
Shortcut
Tricks

» » VBA To Save As CSV File

VBA To Save As CSV File

June 02, 2017 |
This is also related to below queries:
  1. vba save as csv without prompt
  2. vba save as csv comma delimited
  3. excel vba save as csv with prompt
  4. application.getsaveasfilename csv
  5. fileformat:=xlcsv
The Codes:
Sub SaveAsCSV()
Dim fName As Variant
Dim MyFilter As String
MyFilter = "CSV (*.csv),*.csv"
fName = Application.GetSaveAsFilename(FileFilter:=MyFilter)
If fName = False Then Exit Sub
ActiveWorkbook.SaveAs Filename:=fName, FileFormat:=xlCSV
End Sub
Steps:
  1. Create a Quick Access Toolbar (QAT)
    • Excel Options → Quick Access Toolbar → choose Macros command → select PERSONAL.XLSB!SaveAsCSV → click Add >> → OK
    • You may customize the QAT icon and display name by clicking at Modify → then select your icon and change Display name accordingly
  2. Click at the QAT SaveAsCSV to save your file as CSV file
  3. Done

No comments:

Post a Comment