I am running a macro in excel 2007 and I am getting this error see attached image. the code is below but when I run it in office 2003 it works fine. Anybody has an idea on how to fix this problem?


Sub DSOnAir()
Dim i, x, j As Long
Application.Workbooks("Search_xls.xlsx").Activate
ActiveWorkbook.Worksheets("Search_xls").Activate
Worksheets("search_xls").Copy After:=Application.Workbooks("DesignSites.xls").Worksheets("DesignSites")
Sheets(Array("DesignSites", "search_xls")).Select
End Sub

Thanks