'在当前工作表中,绘制从指定区域指向直接引用单元格的追踪箭头。
Sub test1()
Dim rng As Range, x As Range
Set rng = Cells.SpecialCells(xlCellTypeFormulas, 23)
If Not rng Is Nothing Then
For Each x In rng
x.ShowPrecedents
Next
End If
End Sub
'清除指定工作表的追踪箭头。使用审核功能可添加追踪箭头。
Sub test2()
ActiveSheet.ClearArrows
End Sub