This article will explain the VBA runtime Error 9.
Object Doesn’t Exist
If you try to select an object that does not exist – this error will occur.
For example, if you rename a sheet to a useful name like “Sales Figures” but then in your code still refer to the sheet by it’s original name!
Error in Array
When you declare an array, and then try to populate the array before you have defined the size of the array, then this error will also occur.
To solve this problem, make sure you have defined the size of the array.
Sub GetFigures() Dim myArray(1 To 5) As Long myArray(1) = 10 End Sub