View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Charles Charles is offline
external usenet poster
 
Posts: 1
Default Making Excel Ignore invalid references

You can use the On Error Resume Next statement. IE:

On Error Resume Next
Workbooks.Open Filename:="G:\Users\cc\Monthof" & newdate
If Err = 1004 Then ''' Err Code for non existing wookbook..
"" Your code here ""
end if

You can Get this from VBA help.

HTH

Charle

--
Message posted from http://www.ExcelForum.com