B
Brite
I was wondering how i would go about adding a warning message that says "File
cannot be found" to the following code if the the test.xls file cannot be
found?
Sub filefile
Workbooks.Open FileName:="C:\test\test.xls"
MyVal = Application.Workbooks("test.xls").Sheets("Sheet1").Range("A1").Value
Workbooks("test.xls").Close SaveChanges:=False
End Sub
thanks in advance for your help!
cannot be found" to the following code if the the test.xls file cannot be
found?
Sub filefile
Workbooks.Open FileName:="C:\test\test.xls"
MyVal = Application.Workbooks("test.xls").Sheets("Sheet1").Range("A1").Value
Workbooks("test.xls").Close SaveChanges:=False
End Sub
thanks in advance for your help!