J
Jerry
This code runs fine on Office XP, but when I try to run it on an
Office 2000 machine I get a run-time error 1004 unable to paste
because the copy and paste area are not the same. I have searched high
and low to try and fix this on the 2000 machine but so far I have been
unsuccessful. I am hoping to tap the guru pool for help on this one.
Any suggestions would be greatly appreciated! Here is the offending
code:
'***************************************************
'Clean column "A" by removing character returns.
'***************************************************
Range("Q2").Select
r = Cells(Rows.Count, "A").End(xlUp).Row
Range("Q2").FormulaR1C1 = "=CLEAN(RC[-16])"
Range("Q2").AutoFill Destination:=Range("Q2:Q" & r)
Range("Q2:Q65536").Copy
Range("A2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
I get the error on Range(Selection, Selection.End(xlDown).Select
Office 2000 machine I get a run-time error 1004 unable to paste
because the copy and paste area are not the same. I have searched high
and low to try and fix this on the 2000 machine but so far I have been
unsuccessful. I am hoping to tap the guru pool for help on this one.
Any suggestions would be greatly appreciated! Here is the offending
code:
'***************************************************
'Clean column "A" by removing character returns.
'***************************************************
Range("Q2").Select
r = Cells(Rows.Count, "A").End(xlUp).Row
Range("Q2").FormulaR1C1 = "=CLEAN(RC[-16])"
Range("Q2").AutoFill Destination:=Range("Q2:Q" & r)
Range("Q2:Q65536").Copy
Range("A2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
I get the error on Range(Selection, Selection.End(xlDown).Select