LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Searching for a file

Look in Excel VBA help at the ChangeLink command.

--
Regards,
Tom Ogilvy


"Mark McW" wrote:

Thanks very much, appreciate the help. That works fine....... Mark.

Do you also know a way that if you have a link established to another file,
how you can change it (in a macro). Again, by using a file name that is
contained in a cell?

"AA2e72E" wrote:

I think you do have not included the API declaration in the declaration
section. Try another approach

Sub aa()
spath = ActiveWorkbook.Path
If Right(spath, 1) < "\" Then spath = spath & "\"
yourfilename = spath & Sheet6.Range("u61").Value
Select Case Len(Dir(yourfilename))
Case Is = 0
'file does not exist
Case Else
'file exists
End Select
End Sub

 
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
searching a text file and importing selected data brian Excel Discussion (Misc queries) 0 October 30th 07 08:44 PM
Searching for and Pasting Data to a new file Elaine Excel Programming 2 January 10th 06 07:15 PM
Recursive Function + File searching to return path ph8[_6_] Excel Programming 24 October 14th 05 08:45 AM
Searching a txt file for splitting into different worksheets Randy Reese Excel Programming 1 January 30th 04 09:20 PM
File Searching Lawson Excel Programming 1 January 30th 04 03:13 AM


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