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: 51
Default Check for file in folder, if not there, open folder to rename file

I have a macro that looks for a specifically named file in a folder on our
network that may have several files in it. The point of this macro is to
import the contents of the file into another spreadsheet. I can't seem to get
people to realize that this file needs to be named the same thing each week
so my macro can find it. As a result, when my macro goes to import the file

\\000\745\745670\bulkfulfillmentreport.xls

and can't find it, the macro stops in error and I have to rename the file
and restart the macro from the top. I have to do this to 9 different files in
9 different folders and they all have to be named bulkfulfillmentreport.xls

I'd like to figure out a better way to deal with this. I'm thinking some
sort of code that looks in that folder for the file, before the import
starts, and if the file can't be found, just open the folder so I can rename
the file manually. I'm getting stuck on how to make the macro wait while I
rename the file then continue after I'm done. Of course, if the macro could
rename the file for me that would be great, but I never know what some bone
head has named the file so I can't tell the macro what file to look for.
 
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
Check File name for its existance in a folder Muk Excel Programming 9 December 19th 06 07:52 AM
Check for file in folder Les Stout[_2_] Excel Programming 2 October 11th 06 07:08 PM
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
open file from folder save in new folder tim64[_3_] Excel Programming 20 June 17th 05 07:58 PM
check if file is in particular folder nikolaosk[_10_] Excel Programming 2 October 18th 03 04:25 PM


All times are GMT +1. The time now is 06:00 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"