Thread: Compile error
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
KevHardy KevHardy is offline
external usenet poster
 
Posts: 39
Default Compile error

I'm using this vba to copy/delete a row of data from "Allocations" to
"Outcomes":

Private Sub MoveToOutcomes_Click()
If Selection.Rows.Count 1 Then Exit Sub
Set sht = Sheets("Outcomes")
lastrow = sht.Cells(Cells.Rows.Count, "A").End(xlUp).Row
ActiveCell.EntireRow.Copy _
Destination:=sht.Range("A" & lastrow + 1)
ActiveCell.EntireRow.Delete

End Sub

This code had been working perfectly until today but I'm now getting a
"Compile error - Can't find project or library" message.
I haven't made any changes to the workbook so I'm not sure what I've done
wrong?

Any ideas?