Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
try fileSaveName = Application.GetSaveAsFilename( _ InitialFilename:="Dummy.xls", _ fileFilter:="Excel Files (*.xls), *.xls") If fileSaveName < False Then MsgBox "Save as " & fileSaveName End If to set the initial name and the filetype -- Regards Frank Kabel Frankfurt, Germany Matt wrote: I would like to set the default settings on a SaveAs Dialog box. I have the code to set the default file SaveAs name. I would like to also set the file type and the location. For instance, I would like to set the default SaveAs location as my C: drive and the file type as Excel Workbook. Here is what I have so far. Thanks. Matt Application.Dialogs(xlDialogSaveAs).Show (fileToOpen) |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Matt,
For the location, do a ChDir "C:\" before the GetSaveAsFilename -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Frank Kabel" wrote in message ... Hi try fileSaveName = Application.GetSaveAsFilename( _ InitialFilename:="Dummy.xls", _ fileFilter:="Excel Files (*.xls), *.xls") If fileSaveName < False Then MsgBox "Save as " & fileSaveName End If to set the initial name and the filetype -- Regards Frank Kabel Frankfurt, Germany Matt wrote: I would like to set the default settings on a SaveAs Dialog box. I have the code to set the default file SaveAs name. I would like to also set the file type and the location. For instance, I would like to set the default SaveAs location as my C: drive and the file type as Excel Workbook. Here is what I have so far. Thanks. Matt Application.Dialogs(xlDialogSaveAs).Show (fileToOpen) |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
fileToOpen is the name of my file. Where would I put this in the code that you gave me? Thanks. Matt
|
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Matt
to put everything together use: Sub foo() Dim fileSaveName Dim path as string ..... ChDir "C:\" fileSaveName = Application.GetSaveAsFilename( _ InitialFilename:=fileToOpen, _ fileFilter:="Excel Files (*.xls), *.xls") If fileSaveName < False Then MsgBox "Save as " & fileSaveName End If .... end sub -- Regards Frank Kabel Frankfurt, Germany Matt wrote: fileToOpen is the name of my file. Where would I put this in the code that you gave me? Thanks. Matt |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Function Arguments dialog vanishes when clicked an inserted shape | Excel Worksheet Functions | |||
Can you Pre-fill file name in SaveAs dialog | Excel Worksheet Functions | |||
How to delete the "Insert Function Dialog Box" (dialog box only)? | Excel Worksheet Functions | |||
SaveAs dialog | Excel Discussion (Misc queries) | |||
Sort Dialog Arguments | Excel Programming |