All three subs refer to Objects. I don't know where the Error is happeniong.
Declaring Row and Column Counters as Integers is setting up an error. Use Longs.
I don't know who first came up with the idea that CountA was a good way to find the Last Row. Use Cells(Rows.Count, "A").End(xlUp).Row when you can guarantee that a particular column does actually extend to the bottom of a set of Columns.
For a non Rectangular Table, use:
Function RealLastRow(WsName As String) As Long
Dim LastFormula As Range
Dim LastValue As Range
With Worksheets(WsName)
On Error Resume Next
Set LastFormula = .Cells.Find(What:="*", After:=Range("A1"), LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlPrevious)
Set LastValue = .Cells.Find(What:="*", After:=Range("A1"), LookIn:=xlValues, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlPrevious)
On Error GoTo 0
End With
If LastFormula Is Nothing And LastValue Is Nothing Then
RealLastRow = 1
Exit Function
End If
RealLastRow = Application.WorksheetFunction.Max(LastFormula.Row, LastValue.Row)
End Function
Sorry, I didn't record the author's name