Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to prompt the user for a save as file name and defualt the file type
to csv. I am trying Application.Dialogs(xlDialogSaveAs).Show Arg2:=xlCSV result: saves file as csv then code is interrupted also tried Filename = Application.GetSaveAsFilename( _ fileFilter:="Comma Seperated Values (*.csv), *.csv") result: no interruption but does not save file and cannot recall name using ActiveWorkbook.SaveAs |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
maybe...
dim myFileName as Variant myfilename = application.getsaveasfilename("comma separated values, *.csv") if myfilename = false then 'user hit cancel else activeworkbook.saveas filename:=myfilename, fileformat:=xlCSV end if ..getsaveasfilename won't do the save, but it'll give you the name--so you can do your own save. invictus1964 wrote: I want to prompt the user for a save as file name and defualt the file type to csv. I am trying Application.Dialogs(xlDialogSaveAs).Show Arg2:=xlCSV result: saves file as csv then code is interrupted also tried Filename = Application.GetSaveAsFilename( _ fileFilter:="Comma Seperated Values (*.csv), *.csv") result: no interruption but does not save file and cannot recall name using ActiveWorkbook.SaveAs -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I use this
/code Sub CSVName() FullFileName = Application.GetSaveAsFilename("", "CSV (Comma delimited)(*.csv),*.csv", 1, "Save As *.csv") If FullFileName < "False" Then ActiveWorkbook.SaveAs Filename:=FullFileName, FileFormat:=xlCSV End If End Sub /code Craig "invictus1964" wrote in message ... I want to prompt the user for a save as file name and defualt the file type to csv. I am trying Application.Dialogs(xlDialogSaveAs).Show Arg2:=xlCSV result: saves file as csv then code is interrupted also tried Filename = Application.GetSaveAsFilename( _ fileFilter:="Comma Seperated Values (*.csv), *.csv") result: no interruption but does not save file and cannot recall name using ActiveWorkbook.SaveAs |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Import text file into excel with preset file layout, delimeters VBA | Excel Programming | |||
file prompt | Excel Programming | |||
Prompt user to select file with default file selected dialog | Excel Programming | |||
Prompt user to select file with default file selected dialog | Excel Programming | |||
Prompt user to select file with default file selected dialog | Excel Programming |