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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top