Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Save As File Type


Hi there,

I have written a macro to copy a worksheet from an Excel spreadshee
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, bu
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 th
user, the only constant is that the file must be CSV.

Can anyone help?

Thanks

Ma

--
swedish ma
-----------------------------------------------------------------------
swedish max's Profile: http://www.excelforum.com/member.php...fo&userid=2440
View this thread: http://www.excelforum.com/showthread.php?threadid=51815

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Save As File Type

Max,
Check out the GetSaveAsFilename method.

NickHK

"swedish max"
wrote in message
...

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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"
wrote in message
...

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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make a .XLTM template file default to save as .XLSM type? NZCoyote Excel Discussion (Misc queries) 1 April 8th 10 06:01 AM
Attempting to save a file type blocked by registry policy setting Marc Marckwardt Excel Discussion (Misc queries) 5 November 29th 07 11:43 PM
How do you save an excel file to be read as IBM-type text file ? Dee Franklin Excel Worksheet Functions 2 October 10th 06 02:46 AM
default save as file type does not work gregf Excel Discussion (Misc queries) 5 February 10th 06 07:50 PM
why cant i see .csv as save file type Adie Excel Discussion (Misc queries) 3 July 19th 05 06:42 PM


All times are GMT +1. The time now is 04:18 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"