LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
dim dim is offline
external usenet poster
 
Posts: 123
Default Remove end folder from path found with ThisWorkbook.Path command ?

Hi,

I have a problem using the code below:

Workbooks.Open ThisWorkbook.Path & "\Data\Book2.xls"

Im trying to use the above command within Book2.xls. The file and path is:
C:\Program Files\MyProgram\Data\Book2.xls

But I want to open the following:
C:\Program Files\MyProgram\Data1\Book3.xls

When I use:
Workbooks.Open ThisWorkbook.Path & "\Data1\Book3.xls"
Im told that the path C:\Program Files\MyProgram\Data\Data1\Book3.xls could
not be found.

How can I determine the path, then remove the last folder section from it
before adding in the new folder and file to open?....Is this possible?

I Need Help! :drowning: :(
 
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
ThisWorkbook.Path & Windows Vista Tom Excel Programming 1 November 29th 07 01:06 PM
ThisWorkbook.Path not working... rmullen Excel Programming 3 January 17th 06 08:14 PM
ThisWorkbook.Path not updating Bruce Excel Programming 1 January 28th 05 04:39 AM
ThisWorkbook.Path Birdy Excel Programming 1 February 10th 04 02:50 AM
Custom Footer using ThisWorkbook.Path? debartsa Excel Programming 2 November 4th 03 01:47 PM


All times are GMT +1. The time now is 01:37 AM.

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"