|
|
|
Author |
Message |
shandy001
|
Posted: Thu Mar 02 04:07:08 CST 2006 |
Top |
Excel Programming >> 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.hide-link.com/ ;userid=2440
View this thread: http://www.hide-link.com/
Excel323
|
|
|
|
|
NickHK
|
Posted: Thu Mar 02 04:07:08 CST 2006 |
Top |
Excel Programming >> Save As File Type
Max,
Check out the GetSaveAsFilename method.
NickHK
>
> 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?action=getinfo&userid=24408
> View this thread: http://www.excelforum.com/showthread.php?threadid=518157
>
|
|
|
|
|
Bob
|
Posted: Thu Mar 02 04:35:17 CST 2006 |
Top |
Excel Programming >> 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)
>
> 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?action=getinfo&userid=24408
> View this thread: http://www.excelforum.com/showthread.php?threadid=518157
>
|
|
|
|
|
|
|