Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 866
Default ActiveWorkbook.Close function

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 866
Default ActiveWorkbook.Close function

I want to still prompt them on saving but I wanted to prefill in the name of
the file into the File Name field of the Save As window.


"News" wrote:

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




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default ActiveWorkbook.Close function

Use .GetsaveAsFilename and set the first argument, InitialFilename.

NickHk

"Dan" ...
I want to still prompt them on saving but I wanted to prefill in the name
of
the file into the File Name field of the Save As window.


"News" wrote:

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






  #5   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 866
Default ActiveWorkbook.Close function

Something is not working. Where do I set this statement?

Also I want to keep the workbook open after saving the file.


"News" wrote:

Use .GetsaveAsFilename and set the first argument, InitialFilename.

NickHk

"Dan" ...
I want to still prompt them on saving but I wanted to prefill in the name
of
the file into the File Name field of the Save As window.


"News" wrote:

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








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default ActiveWorkbook.Close function

Before you wish to .SaveAs the file, the same as you are using the
GetOpenFilename before you .Open the file initially.

As for keeping the file open, don't .Close it then, although I thought was
the whole point going by your subject line.

NickHK

"Dan" wrote in message
...
Something is not working. Where do I set this statement?

Also I want to keep the workbook open after saving the file.


"News" wrote:

Use .GetsaveAsFilename and set the first argument, InitialFilename.

NickHk

"Dan"

...
I want to still prompt them on saving but I wanted to prefill in the

name
of
the file into the File Name field of the Save As window.


"News" wrote:

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








Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ActiveWorkbook.Close True Sige Excel Programming 6 March 22nd 06 08:59 AM
ActiveWorkbook.Close (False) stefan via OfficeKB.com Excel Programming 3 July 12th 05 12:42 AM
ActiveWorkbook.Close dallas Excel Programming 0 November 3rd 04 06:27 PM
ActiveWorkbook.Close dallas Excel Programming 2 November 3rd 04 05:56 PM
ActiveWorkbook.Close Matthew[_9_] Excel Programming 4 November 13th 03 02:48 AM


All times are GMT +1. The time now is 03:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"