View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default using cell value to open file

Try this code. Change folder as required

Sub OpenJobFile()

Folder = "C:\temp"

JobNumber = ActiveCell.Value

FName = Dir(Folder & "\*" & JobNumber & "*.xls")

If FName = "" Then
MsgBox ("Cannot find file : " & Folder & "\*" & JobNumber & "*.xls")
Else
Workbooks.Open Filename:=Folder & "\" & FName
End If

End Sub


"ward376" wrote:

You could make them hyperlinks...

Cliff Edwards