Runtime error '424': Object Required

  • Thread starter Thread starter loren.pottinger
  • Start date Start date
L

loren.pottinger

I keep getting error in the subject line. Can anyone help me debug this
code. Thanks

Sub CopyFixedAssetsformulas()
Dim startRange As Range
Dim rglast As Variant
Dim lastrange As Variant
Set startRange = Sheet20.Range("A5")
Set rglast = Sheet20.Range("A5").SpecialCells(xlCellTypeLastCell)

Set lastrange = Sheet20.Range("A5", "A" &
rglast.Row).Find("Summary", LookIn:=xlValues)

Sheet20.Range("K5", "V5").Copy
Sheet20.Range("K6", "V" & lastrange.Row - 2).PasteSpecial
(xlPasteFormulasAndNumberFormats)
Application.CutCopyMode = False


Sheet20.Range("A5").Select

End Sub
 
Works fine for me in Excel 2003

Which line is causing you the problem?
 
You have other replies at your other posts.

loren.pottinger said:
I keep getting error in the subject line. Can anyone help me debug this
code. Thanks

Sub CopyFixedAssetsformulas()
Dim startRange As Range
Dim rglast As Variant
Dim lastrange As Variant
Set startRange = Sheet20.Range("A5")
Set rglast = Sheet20.Range("A5").SpecialCells(xlCellTypeLastCell)

Set lastrange = Sheet20.Range("A5", "A" &
rglast.Row).Find("Summary", LookIn:=xlValues)

Sheet20.Range("K5", "V5").Copy
Sheet20.Range("K6", "V" & lastrange.Row - 2).PasteSpecial
(xlPasteFormulasAndNumberFormats)
Application.CutCopyMode = False


Sheet20.Range("A5").Select

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top