LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default Opening a document without adding the path

Use ThisWorkbook.Path for the path of the workbook with the code in it.
--
HTH...

Jim Thomlinson


"Tmf" wrote:


Hey everyone.

I've got this code:

Workbooks.Open ("C:\Documents and
settings\tmf\Desktop\NY\TEST\template.xls")

ActiveWorkbook.SaveCopyAs "C:\Documents and
Settings\tmf\Desktop\NY\TEST\template1.xls"

I run this code from another file in the some folder "TEST". I would
like to be able to run "template.xls" WITHOUT adding the path of the
folder "TEST". Of course the file with the code should be in the same
folder.

I HTML one just say :\template.xls - how about VBA?

Please help me! :)

Best regards and thank you.

/Tommy


--
Tmf
------------------------------------------------------------------------
Tmf's Profile: http://www.excelforum.com/member.php...o&userid=24985
View this thread: http://www.excelforum.com/showthread...hreadid=385247


 
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
document path stamp brocon Excel Discussion (Misc queries) 1 November 6th 08 11:06 AM
Need to add the path to my document anita67 New Users to Excel 1 November 4th 08 05:20 PM
Path to Lookup from another document Boethius1 Excel Discussion (Misc queries) 8 January 18th 06 07:13 PM
Excel saves the path of the printer with the document. GD Excel Discussion (Misc queries) 0 October 21st 05 12:48 AM
Determining path to document template PO Excel Programming 2 April 17th 05 01:49 AM


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