Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Resume on Error?
Hi, I am using this code to get rid of #DIV/0 and other errors:
Range("I5:Q29").Select Selection.SpecialCells(xlCellTypeFormulas, 16).Select Selection.ClearContents However, if there are no errors it stops my code from running and says it found no cells. How can I have it say if there are none or if there is an error from this then to skip it and just resume? Thank you!!! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Resume on Error?
Dan,
Try Range("I5:Q29").Select On Error Resume Next Selection.SpecialCells(xlCellTypeFormulas, xlErrors).Select If Err.Number = 0 Then Selection.ClearContents End If -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "dan" wrote in message ups.com... Hi, I am using this code to get rid of #DIV/0 and other errors: Range("I5:Q29").Select Selection.SpecialCells(xlCellTypeFormulas, 16).Select Selection.ClearContents However, if there are no errors it stops my code from running and says it found no cells. How can I have it say if there are none or if there is an error from this then to skip it and just resume? Thank you!!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
On Error {...} Resume Next | Excel Programming | |||
On Error Resume Next ? | Excel Programming | |||
On Error Resume Next | Excel Programming | |||
On Error Resume Next | Excel Programming | |||
On Error Resume Next | Excel Programming |