Range.Errors property (Excel)
Allows the user to access error checking options.
Syntax
expression.Errors
expression A variable that represents a Range object.
Remarks
Reference the Errors object to view a list of index values associated with error checking options.
Example
In this example, a number written as text is placed in cell A1. Microsoft Excel then determines if the number is written as text in cell A1 and notifies the user accordingly.
Sub CheckForErrors()
Range("A1").Formula = "'12"
If Range("A1").Errors.Item(xlNumberAsText).Value = True Then
MsgBox "The number is written as text."
Else
MsgBox "The number is not written as text."
End If
End Sub
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
Saran dan Komentar
https://aka.ms/ContentUserFeedback.
Segera hadir: Sepanjang tahun 2024 kami akan menghentikan penggunaan GitHub Issues sebagai mekanisme umpan balik untuk konten dan menggantinya dengan sistem umpan balik baru. Untuk mengetahui informasi selengkapnya, lihat:Kirim dan lihat umpan balik untuk