Hello everyone, I am getting an error on the code below (bold/underlined code) that says "Run-time Error 438: Object doesn't support this property or method"....
Any thoughts/ideas on why I am getting this error and how it can be fixed?
Any thoughts/ideas on why I am getting this error and how it can be fixed?
Code:
Sub Insert_Rows()
Dim sh As Worksheet
Dim End_Row As Long
Dim n As Long
Dim Ins As Long
For Each sh In ActiveWorkbook.Sheets
If Left(sh.Name, 9) = "Labor BOE" Then
End_Row = sh.Range("J" & Rows.Count).End(xlUp).Row
Application.ScreenUpdating = False
For n = End_Row To 3 Step -1
Ins = sh.Cells(n, "A").Value
If Ins > 0 Then
[U][I][B] sh.Range("A" & n + 1 & ":A" & n + Ins).c.Insert[/B][/I][/U]
sh.Range("A" & n & ":J" & n).Copy Destination:=sh.Range("A" & n + 1 & ":L" & n + Ins)
End If
Next n
End If
Next sh
End Sub