Making Excel Ignore invalid references

A

abxy

Hi,

I want to have a document with cells that have formulas that referenc
workbooks that don't exist...yet. Except, the problem is, excel won'
let me enter in invalid workbook references. Any idea of how I can ge
around this. Basically make excel ignore the fact the workboo
reference is invalid (in due time they will become valid, because th
workbooks that they refer to will be create). Any Idea how i can d
this...if it can even be done.

Thanks in Advanc
 
C

Charles

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
 
Top