Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Saving an update file in same directory as older one

I am looking for a macro to save an updated file (created from an older one
using a macro) in the same directory as the original. The newer file will
then transfer some of the data from the older file to the newer.

When I run the macro I created on my own PC from the directory where the
original file was created all is fine - new file created in same directory,
data transferred.

The problem starts when I transfer the file to another computer or even a
different directory and run the macro from there. The new file is still
created, but it appears in a different directory to the original and hence it
cannot identify where the original file is located.

Is there a macro to say 'create file in same directory as the old one'?

Putting in a specific path would not work as there is no guarantee that when
the file is transferred it will be in a specific location

Any help appreciated


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 373
Default Saving an update file in same directory as older one

ThisWorkbook.Path will give you the path of the workbook with the program in
it. James

"SyZyGy" wrote in message
...
I am looking for a macro to save an updated file (created from an older one
using a macro) in the same directory as the original. The newer file will
then transfer some of the data from the older file to the newer.

When I run the macro I created on my own PC from the directory where the
original file was created all is fine - new file created in same
directory,
data transferred.

The problem starts when I transfer the file to another computer or even a
different directory and run the macro from there. The new file is still
created, but it appears in a different directory to the original and hence
it
cannot identify where the original file is located.

Is there a macro to say 'create file in same directory as the old one'?

Putting in a specific path would not work as there is no guarantee that
when
the file is transferred it will be in a specific location

Any help appreciated




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
Saving Excel File in Current Directory NOT My Documents Fredriksson via OfficeKB.com Excel Programming 1 November 6th 06 09:08 PM
Saving Excel File in Current Directory NOT My Documents Fredriksson via OfficeKB.com Excel Programming 0 November 6th 06 07:47 PM
Excel should let me sort the file directory when saving a file Beanee70 Excel Discussion (Misc queries) 0 March 14th 06 07:03 AM
Saving file to specific directory sungen99[_75_] Excel Programming 1 February 22nd 06 02:01 PM
Setting Directory when Saving File David Excel Programming 1 December 29th 05 02:28 AM


All times are GMT +1. The time now is 06:05 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"