• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 171
  • Last Modified:

Remove cell warnings

Hi,

Im getting a "cell unrptected error" after some formatting, can i have a line of code that removes that warning?

Thanks
0
Seamus2626
Asked:
Seamus2626
2 Solutions
 
Brad GrouxSenior Manager (Wintel Engineering)Commented:
aCell.Errors(i).Ignore = bIgnore

Example:
Sub IgnoreErrCheckingOnRange(aRange As Range, bIgnore As Boolean)
    '-- This switch off/on all 8 types of error checking on each cell in a specified range.
    Dim aCell As Range, i As Long
    
    For Each aCell In aRange.Cells
        For i = 1 To 8
           aCell.Errors(i).Ignore = bIgnore
        Next
    Next
End Sub

Sub Test()
    IgnoreErrCheckingOnRange Sheet1.Range("A1:B10"), True
End Sub

Open in new window

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now