Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default get path - save new file - same sub-directory as existing file

Is it possible to amend this code to get the path so as to save the new file
in the same sub-directory as the existing file?

Worksheets(1).Select
ActiveWorkbook.SaveAs Filename:=Format(Range("H22").Value, "d MMMM yyyy") &
" NEW.xls" _


--

DL


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default get path - save new file - same sub-directory as existing file

Worksheets(?).Path

Alan

"tegger" wrote in message
...
Is it possible to amend this code to get the path so as to save the new

file
in the same sub-directory as the existing file?

Worksheets(1).Select
ActiveWorkbook.SaveAs Filename:=Format(Range("H22").Value, "d MMMM yyyy")

&
" NEW.xls" _


--

DL




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default get path - save new file - same sub-directory as existing file

Try something like

ActiveWorkbook.SaveAs Filename:=ActiveWorkbook.Path & _
"\" & Format(Range("H22").Value,"d MMMM yyyy) & " New.xls"


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"tegger" wrote in message
...
Is it possible to amend this code to get the path so as to save the new

file
in the same sub-directory as the existing file?

Worksheets(1).Select
ActiveWorkbook.SaveAs Filename:=Format(Range("H22").Value, "d MMMM yyyy")

&
" NEW.xls" _


--

DL




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
Save file to same directory folder RobN[_2_] Excel Discussion (Misc queries) 2 April 4th 10 08:06 AM
file save error: the file or directory cannot be created dublg Excel Discussion (Misc queries) 1 September 25th 06 07:07 PM
auto file path update when excel sheet moved to another directory. GNSBoy Excel Discussion (Misc queries) 1 August 31st 05 07:46 PM
can i save an existing .xls file as a .csv file using command line craigkan Excel Discussion (Misc queries) 2 February 18th 05 02:01 PM
How do I insert the directory path in my Excel file? Insert a Directory Path in Header/Footer Excel Worksheet Functions 2 February 4th 05 09:23 PM


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