View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default How do you ignor File Not Found Dialog Popup ?

Hi Barb

Dan want to test the worksheet name, not the workbook name

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Barb Reinhardt" wrote in message
...
I think I'd use the FileExists method to determine if the file did exist
before entering the formula in a cell.

http://msdn.microsoft.com/en-us/libr...5t(VS.85).aspx

when I use it, I enter the full path in filespec. I've tweaked the code to
make the function return a boolean TRUE/FALSE and execute other actions based
on that result.
--
HTH,

Barb Reinhardt



"Dan Thompson" wrote:

Workbooks("Master.xls").Worksheets("UpdatedList"). Cells(rw, 2).FormulaR1C1 =
"='[" & FileName & "]PointCount'!R2C5"

The above is my line of code that inserts a formula into a cell in my
Master.xls workbook the formula links to a value in the worksheet called
PointCount from multiple different workbooks. the problem is that if the
program encounters a workbook that does not have a worksheet named
"PointCount" I get a pop up FileNotFound window asking me to browse to the
file that has the worksheet "PointCount" I do not want it to do this. Is
there a way to have my macro skip over these files or suppres the "File Not
Found" Pop up from poping up ?