Results 1 to 6 of 6

Export worksheet as CSV with Save As dialog

Threaded View

  1. #1
    Registered User
    Join Date
    04-28-2014
    Location
    Greece
    MS-Off Ver
    Excel 2010
    Posts
    3

    Question Export worksheet as CSV with Save As dialog

    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
    Last edited by panblock; 04-29-2014 at 12:06 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. VBA Export worksheet to CSV and save on desktop
    By jph89 in forum Excel General
    Replies: 0
    Last Post: 08-30-2012, 11:55 AM
  2. Export word file prompting a dialog box save location
    By Fossilized in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-05-2011, 03:04 AM
  3. export and save worksheet as a picture.
    By Diesel13 in forum Excel General
    Replies: 18
    Last Post: 10-22-2010, 05:04 PM
  4. Save\export specific worksheet error
    By SarahPintal in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-23-2010, 05:12 PM
  5. Export with save as dialog
    By tommy_gtr in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-22-2005, 11:22 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1