+ Reply to Thread
Results 1 to 3 of 3

Save As File Type

  1. #1
    Registered User
    Join Date
    06-17-2005
    Posts
    9

    Save As File Type

    Hi there,

    I have written a macro to copy a worksheet from an Excel spreadsheet into a new workbook. I then wish to save this wookbook as a CSV file.

    The problem is that I want the Save As box to appear for the user, but I want to to default automatically to CSV in the file type drop down. The location and name of where the file is being saved depends on the user, the only constant is that the file must be CSV.

    Can anyone help?

    Thanks

    Max

  2. #2
    NickHK
    Guest

    Re: Save As File Type

    Max,
    Check out the GetSaveAsFilename method.

    NickHK

    "swedish max" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi there,
    >
    > I have written a macro to copy a worksheet from an Excel spreadsheet
    > into a new workbook. I then wish to save this wookbook as a CSV file.
    >
    > The problem is that I want the Save As box to appear for the user, but
    > I want to to default automatically to CSV in the file type drop down.
    > The location and name of where the file is being saved depends on the
    > user, the only constant is that the file must be CSV.
    >
    > Can anyone help?
    >
    > Thanks
    >
    > Max
    >
    >
    > --
    > swedish max
    > ------------------------------------------------------------------------
    > swedish max's Profile:

    http://www.excelforum.com/member.php...o&userid=24408
    > View this thread: http://www.excelforum.com/showthread...hreadid=518157
    >




  3. #3
    Bob Phillips
    Guest

    Re: Save As File Type


    Dim fileSaveName

    fileSaveName = Application.GetSaveAsFilename( _
    fileFilter:="CSV Files (*.csv), *.csv")
    If fileSaveName <> False Then
    ActiveWorkbook.SaveAs fileSaveName
    End If

    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "swedish max" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi there,
    >
    > I have written a macro to copy a worksheet from an Excel spreadsheet
    > into a new workbook. I then wish to save this wookbook as a CSV file.
    >
    > The problem is that I want the Save As box to appear for the user, but
    > I want to to default automatically to CSV in the file type drop down.
    > The location and name of where the file is being saved depends on the
    > user, the only constant is that the file must be CSV.
    >
    > Can anyone help?
    >
    > Thanks
    >
    > Max
    >
    >
    > --
    > swedish max
    > ------------------------------------------------------------------------
    > swedish max's Profile:

    http://www.excelforum.com/member.php...o&userid=24408
    > View this thread: http://www.excelforum.com/showthread...hreadid=518157
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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