View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
News[_3_] News[_3_] is offline
external usenet poster
 
Posts: 14
Default ActiveWorkbook.Close function

Just do a
WB.SaveAs NameYouWant.xls,xlWorkbookNormal
then when you close, the SaveAs dialog will not show.

NickHK

"Dan" ...
Is there a way to prefill in the "File Name:" in the Save As window when
using the ActiveWorkbook.Close function?

I want to prefill the filed with the name of the file opened with

DataFileName = Application.GetOpenFilename(filefilter:="Text or ASC Files,
*.txt; *.asc", Title:="Select the Data File")

Want the workbook name to be the same name as that opened by DataFileName
(less the .txt or .asc extension) and not "Sheet1".

Thanks