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: 557
Default Macro to Open excel file when file name is entered in cell

Hi all, In Folder "C:\Documents\Data" I have about 10 Subfolders in
each Subfolders I have about 20 excel files. All excel files names
are something like (see below)

523699.xlsx
568944 - pg 1.xlsx
568944 - pg 2.xlsx
578944 - 578945.xlsx
588771.xlsx
etc……

I want macro assigned to a button and I want that when I click on the
button macro should look the file name in cell A1 and then look that
file in all the Subfolders and then when file is found macro should
open that file else pop up MsgBox saying "File is not found". For
example if I put file name (like given above) 523699 in cell A1 and
when I click button, macro should look for this file in all the
Subfolders and if file is found then macro should open it otherwise
MsgBox should pop up saying that "File is not found". Hope I was able
to explain my question. Can please any friend help me?
 
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
2007 Macro to Open File, Delete Contents, Save New File Flintstone[_2_] Excel Discussion (Misc queries) 2 February 1st 10 11:25 PM
Open File, pause macro until file is selected Jims Excel Programming 2 December 6th 07 01:34 PM
Open a file do a macro ( made) and open next succesive file SVTman74 Excel Programming 5 April 21st 06 10:14 PM
Automate open file, update links, run macro, close and save file Geoff[_7_] Excel Programming 2 August 26th 03 10:13 PM


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