View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gary McCarthy Gary McCarthy is offline
external usenet poster
 
Posts: 10
Default Object Required error

I have the below code that has been working fine and still does in some
macros, however in others it has stopped and returns the 424 Object Required
error -

Dim ws As Worksheet
Dim wsName As String
Set ws = ActiveSheet
ws.Move After:=Sheets(Sheets.Count)

lastrow = Worksheets(ws.Name).Cells(Rows.Count, "A").End(xlUp).Row

Range("H2").AutoFill Range("H2:H" & lastrow)


Why would this be happening all of a sudden and only in certain macros?

Thanks.