View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
AlexD AlexD is offline
external usenet poster
 
Posts: 10
Default worksheet error checking

Thanks, Carlos.

You are right.

-----Original Message-----
Alex

If IsError(xlbook.Worksheets(1).Cells(i, j)) is the same

If IsError(xlbook.Worksheets(1).Cells(i, j)) =True

If Not(IsError(xlbook.Worksheets(1).Cells(i, j))) is the

same

If IsError(xlbook.Worksheets(1).Cells(i, j)) =False

"AlexD" wrote in

message
...
Thanks, I've got it.
I'm using now:

If IsError(xlbook.Worksheets(1).Cells(i, j)) = True ...

It's working

-----Original Message-----
How could I check from VB whether a spreadsheet has any
errors?

I'm trying to use
If xlbook.Worksheets(1).Cells(i, j) = "#DIV/0!"

Then ...
but the type is mismatched.

The following is not working as well
If xlbook.Worksheets(1).IsError(Cells(i, j)) =

True ...

It's a good function (ISERROR) for a spreadsheet but
cannot be used like this in VB(no property).

Can anybody advise anything?

Thanks
.



.