I assume you want to do this with VBA also as with your next post. Here's a simple code example that opens a file, or to avoid a run time error alerts you that no such file exists.
Sub OpenFile() On Error Resume Next Application.Workbooks.Open "C:\My Documents\YourFileName.xls" If Err Then MsgBox "No such file." Err = 0 On Error GoTo 0 End Sub