VBA Error 13 type: mismatch

人盡茶涼 提交于 2019-11-28 14:29:46

EDIT

If you have any error values in the sheet (eg #NA #DIV/0 etc) then the If Cell... line will fail

Change it to

Private Sub Worksheet_Change(ByVal Target As Range)
    Dim Cell as Range
    Set MyPlage = Range("G3:AG115")
    For Each Cell In MyPlage.Cells
        If Not IsError(Cell) Then
            If Cell.Value = "." Then
                Cell.Interior.ColorIndex=28
                Cell.Font.Bold = True
            End If

            etc

        End If
     Next
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!