View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
nospaminlich nospaminlich is offline
external usenet poster
 
Posts: 68
Default ActiveSheet.Paste error in XP

I've got a macro which works perfectly in Windows 2000 with Excel 2000 but
falls over in Windows XP Pro with Excel 2003.

It fails on ActiveSheet.Paste with an error message Run Time Error 1004 -
Application defined or object defined error.

Any ideas would be much appreciated

Thanks

The full code is:


Sheets("Data").Select
Range("A1:AJ15000").AdvancedFilter Action:=xlFilterInPlace,
CriteriaRange:= _
Range("AP1:AP2"), Unique:=False
Range("A1").Select

Range("A2:A15000,C2:C15000,E2:E15000,F2:f15000,G2: g15000,H2:h15000,I2:I15000").Select
Selection.Copy
Sheets("Signup Report").Select
Range("A2").Select
ActiveSheet.Paste
Sheets("Data").Select
Range("J2: J15000 , L2: L15000 , M2: M15000 , AG2: AG15000 , AI2:
AI15000 , O2: o15000 ").Select
Selection.Copy
Sheets("Signup Report").Select
Range("I2").Select
ActiveSheet.Paste

Dim frng As Range
Application.CutCopyMode = False
Range("H2").FormulaR1C1 = "=RC6+90"
Set frng = Range("h2:h" & Range("f65536").End(xlUp).Row)
frng.FillDown

Range("o2").FormulaR1C1 = "=Sum(RC11:RC14)"
Range("p2").FormulaR1C1 = "=ROUND(RC15*25%,2)"
Set frng = Range("o2:p" & Range("f65536").End(xlUp).Row)
frng.FillDown


Columns("j:p").Select
Selection.NumberFormat = "0.00"
Columns("e:i").Select
Selection.NumberFormat = "dd/mm/yyyy"
Columns("a:d").Select
Selection.Columns.AutoFit
Columns("e:p").Select
Selection.ColumnWidth = 11.5
Application.Calculation = xlCalculationAutomatic
Selection.Copy
Selection.PasteSpecial Paste:=xlValues
Application.CutCopyMode = False
Range("a1").Select
end sub