LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default VBA can't find file as it moves from folder to folder

OK -- I need professional help.

I have two files used by several people in the company. One file ('user')
captures information for each person's business unit, and compares it to
industry standards for that type of service. It pulls the 'comparative'
information from the second file. Since the formulas are complex, I've
protected everything so that the users can't break it. I want the
comparative info in a second file so that, as it gets updated from year to
year, the users can just swap the new file in for the old one.

I've written the VBA language below with the idea that, wherever the 'user'
file is, it would look in the same folder for the 'comparative' file.
However, that's not happening. What happens instead is that, regardless
where the user puts the two files, the 'user' file looks back to the original
folder on my computer. Needless to say, it ain't found.

Here's what I wrote, and I'm hoping this is where the problem lies.


Private Sub Workbook_Open()
Dim File_Path As String
Dim File_Name As String

File_Path = ThisWorkbook.Path
File_Name = File_Path & "\" & "Instrument Panel Reference Data.xls"
Workbooks.Open Filename:=File_Name, UpdateLinks:=3

Thanks in advance for any help you can offer.

Windows(ThisWorkbook.Name).Activate
 
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 in a new folder, but create folder only if folder doesn't already exist? nbaj2k[_40_] Excel Programming 6 August 11th 06 08:41 PM
Find New File/Folder BOONER Excel Programming 2 July 20th 06 04:25 PM
Need code to save file to new folder, erase from old folder Ron M. Excel Discussion (Misc queries) 1 February 24th 06 06:02 PM
open file from folder save in new folder tim64[_3_] Excel Programming 20 June 17th 05 07:58 PM
Create Folder and Text File in folder Todd Huttentsine Excel Programming 2 April 29th 04 03:41 PM


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