Home |
Search |
Today's Posts |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Much obliged, gentlemen. Your suggestions worked like a charm.
Thanks. "Tom Ogilvy" wrote: Use Dim sName as String, fName as String sName = activeworkbook.name sName = left(sName,len(sName)-4) & ".xls" fName = Application.GetSaveAsFilename(InitialFilename:=sNa me, _ filefilter:="xls Files (*.xls), *.xls") if fName < "False" then activeworkbook.SaveAs fName, xlWorkbookNormal else msgbox "You clicked cancel" exit sub End if GetSaveAsFilename puts up the same dialog, but only returns the fully qualified filename selected. You then do the save, having full control of the format. -- Regards, Tom Ogilvy "Jesterhoz" wrote in message ... Thanks for responding, Bob. I only have one concern, though. I am using the following: Application.Dialogs(xlDialogSaveAs).Show This opens the SaveAs Dialog box and allows the user to navigate to a folder of choice and save the file with whatever name they choose. How can I incorporate the FileFormat property into this call? Thanks, Trevor "Bob Phillips" wrote: Trevor, SaveAs has a FileFormat property. However, the help says ... For an existing file, the default format is the last file format specified; for a new file, the default is the format of the version of Excel being used. ... so it should default to Excel file. If you want to force it, set it to xlWorkbookNormal. -- HTH RP (remove nothere from the email address if mailing direct) "Jesterhoz" wrote in message ... Hello All, I have a macro that imports a text file, does some manipulations and, in the end, displays the SaveAs dialog box. The default "Save as type" is "Text(Tab Delimited)". However, the user is always going to want this changed to "Microsoft Excel Workbook". Does anyone know how to change the "Save as type" to be "Microsoft Excel Workbook" using VBA? Any help would be much appreciated. Thanks, Trevor |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
SaveAs wk3 file type error message | Excel Discussion (Misc queries) | |||
How do I set default Excel Saveas file format to xlsx not xlsx | Setting up and Configuration of Excel | |||
Default reference type | Excel Discussion (Misc queries) | |||
Default to SaveAs | Excel Programming | |||
Default recordset type? | Excel Programming |