First you should check if there are any formulas something like this...
dim cell as range
dim rngFormulas as range
on error resume next
set rngFormulas = cells.specialcells(xlCellTypeFormulas)
on error goto 0
if rngformulas is nothing then
msgbox "Sorry, No formulas."
else
for each cell in rngformulas
msgbox cell.Address
next cell
end if
--
HTH...
Jim Thomlinson
"Peter" wrote:
> Thanks for the help of Norman and Dave at
> http://msdn.microsoft.com/newsgroups...=en-us&m=1&p=1
>
> Now, I have another follow up question about formula in Excel worksheet.
>
> I got a "No Cells were found" error if I use Active Sheet.SpecialCells()
> method to retrieve all formulae on a worksheet. I suspect that this error
> happen because I try to retrieve "nothing" if a worksheet have NO formula at
> all. However, how can I skip this worksheet and then go on to next
> worksheets?
>
> Thanks,
> Peter
Bookmarks