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 OPEN EXCEL FILE ACCORDING TO CELL VALUE

Hi all, I am looking for a macro which should do something like this
(see below) when I click the button on sheet

Sub openfile()
if Mid(any file in "C:\Document\KK\" , 5 , 6).Name = Range("A1").Value
Then
Open that file
Else
MsgBox "File not Exist"
End If
End Sub

in other words I want macro to check all excel files in Folder "C:
\Document\KK\" and if any file "Mid(file name , 5 , 6)" equal to
Range("A1"). Value then Open that file. For example if the file have
name is "kks 556331" then if I put only "556331" in cell A1 and click
the button then macro should open that file. I hope I was able to
explain what i want. Please can any body help
 
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
In Excel - Use Windows Explorer instead of File Open to open file KymY Excel Discussion (Misc queries) 1 August 5th 06 09:59 PM
Open an Excel File from Selected Cell maperalia Excel Programming 2 April 14th 06 09:19 PM
open a non-office file using cell data from excel dcauldwell Excel Discussion (Misc queries) 2 January 16th 06 03:04 PM
can not open excel file, too many different cell formats Abdur Excel Discussion (Misc queries) 1 March 17th 05 12:13 PM
open excel file with cell highlighted rakka rage Excel Programming 1 October 6th 03 03:06 PM


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