By using vba.booksticle.com you agree to our cookie policy, We and our partners operate globally and use cookies, for multiple purposes

948 Steps to 6 Figures by Learning Excel-VBA and Other Skills



Step 562 - Error(x) ' displays error message


if x contains the value of an error "err" it will display the error message.

Try the following code:

Sub DisplayErrors()
   for i = 1 to 100
       debug.Print i, Error(i)
   nex
End Sub

   Table of Contents | Send us your feedback | © 2025 All Rights Reserved | Edit