Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
After GetSaveAsFileName question
I use GetSaveAsFileName as follows:
fName = Application.GetSaveAsFilename _ (sStr, "Excel Files (*.xls),*.xls)") If fName < ThisWorkbook.Name And fName < "False" Then I now wish to add a new single sheet workbook and name it with the workbook name the user chose with fName. How do I do this, please? Regards. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.716 / Virus Database: 472 - Release Date: 05/07/2004 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
After GetSaveAsFileName question
Hi Stuart
Try something like this Sub Test() Dim fname As Variant Dim NewWb As Workbook Set NewWb = Workbooks.Add(xlWBATWorksheet) fname = Application.GetSaveAsFilename("", _ fileFilter:="Excel Files (*.xls), *.xls") If fname < "False" Then NewWb.SaveAs fname NewWb.Close False Set NewWb = Nothing Else NewWb.Close False Set NewWb = Nothing End If End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "Stuart" wrote in message ... I use GetSaveAsFileName as follows: fName = Application.GetSaveAsFilename _ (sStr, "Excel Files (*.xls),*.xls)") If fName < ThisWorkbook.Name And fName < "False" Then I now wish to add a new single sheet workbook and name it with the workbook name the user chose with fName. How do I do this, please? Regards. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.716 / Virus Database: 472 - Release Date: 05/07/2004 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help with getsaveasfilename | Excel Discussion (Misc queries) | |||
GetSaveAsFilename method | Excel Programming | |||
GetSaveAsFilename | Excel Programming | |||
GetSaveAsFileName Not Working | Excel Programming | |||
Excel 2002 GetSaveAsFileName | Excel Programming |