Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default I try it again. Howto. Proposed Filename and path different by the default with VBA

Hi all,

I submit again my issue because I have not managed to make myself
understood yesterday.

I have a macro that is lauched by MsAccess and among the other things,
it opens an Excel workbook formatted by the template ExcelTemp.xlt I
programmatically open the workbook with.

The workbook consists of a list of costs/prices and totals. When the
macro ends, the Excel sheet needs to remain Open and Active for the
user to check/complete the workbook and save it,manually. So, file
saving is not made by the macro automaticallybut by the user.

Now, Excel proposes a default filename (in the titlebar) as the
filename of the template plus 1 ( template = ExcelTemp.xlt - proposed
filename: ExcelTemp1.xls) and the destination directory, the same of
the template.

Now, I would like to be able to let Excel propose a filename and path
to save the file to different by these: they should both be the same of
the MsAccess database (but filename with extension xls, of course).

How can I programmatically command Excel to "propose" different
filename and path than the default ones? My goalis to let the user
csimply click on save and the file is already saved in the right
directory with the right name.

Thank you.
Fabian

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default I try it again. Howto. Proposed Filename and path different by the default with VBA

Don't believe that is possible.

--
Regards,
Tom Ogilvy


"Fabian" wrote in message
oups.com...
Hi all,

I submit again my issue because I have not managed to make myself
understood yesterday.

I have a macro that is lauched by MsAccess and among the other things,
it opens an Excel workbook formatted by the template ExcelTemp.xlt I
programmatically open the workbook with.

The workbook consists of a list of costs/prices and totals. When the
macro ends, the Excel sheet needs to remain Open and Active for the
user to check/complete the workbook and save it,manually. So, file
saving is not made by the macro automaticallybut by the user.

Now, Excel proposes a default filename (in the titlebar) as the
filename of the template plus 1 ( template = ExcelTemp.xlt - proposed
filename: ExcelTemp1.xls) and the destination directory, the same of
the template.

Now, I would like to be able to let Excel propose a filename and path
to save the file to different by these: they should both be the same of
the MsAccess database (but filename with extension xls, of course).

How can I programmatically command Excel to "propose" different
filename and path than the default ones? My goalis to let the user
csimply click on save and the file is already saved in the right
directory with the right name.

Thank you.
Fabian



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default I try it again. Howto. Proposed Filename and path different by the default with VBA

Fabian,
In the _BeforeSave event, show your own dialog with your desired defaults.
Save the file.

Cancel=true

So you only do this the first time, it is probably good to check the
..Path="".

NickHK

"Fabian" wrote in message
oups.com...
Hi all,

I submit again my issue because I have not managed to make myself
understood yesterday.

I have a macro that is lauched by MsAccess and among the other things,
it opens an Excel workbook formatted by the template ExcelTemp.xlt I
programmatically open the workbook with.

The workbook consists of a list of costs/prices and totals. When the
macro ends, the Excel sheet needs to remain Open and Active for the
user to check/complete the workbook and save it,manually. So, file
saving is not made by the macro automaticallybut by the user.

Now, Excel proposes a default filename (in the titlebar) as the
filename of the template plus 1 ( template = ExcelTemp.xlt - proposed
filename: ExcelTemp1.xls) and the destination directory, the same of
the template.

Now, I would like to be able to let Excel propose a filename and path
to save the file to different by these: they should both be the same of
the MsAccess database (but filename with extension xls, of course).

How can I programmatically command Excel to "propose" different
filename and path than the default ones? My goalis to let the user
csimply click on save and the file is already saved in the right
directory with the right name.

Thank you.
Fabian



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
http://CannotDeleteFile.net - Cannot Delete File? Try Long Path ToolFilename is too long? Computer Complaining Your Filename Is Too Long? TheLong Path Tool Can Help While most people can go about their businessblissfully unaware of the Windo Max Loger Excel Discussion (Misc queries) 0 June 14th 11 04:30 PM
showing path and filename Annie Excel Worksheet Functions 1 February 9th 07 01:34 PM
How do i display the Filename without the path? robert_manic Excel Discussion (Misc queries) 3 October 11th 06 05:47 PM
Choosing default path/filename in Excel with VBA Fabian[_3_] Excel Programming 4 March 4th 06 08:21 PM
Filename and path Mike Excel Programming 1 October 19th 05 07:33 PM


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

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

About Us

"It's about Microsoft Excel"