I've been reading like posts on mrexcel.com for an hour - but still cannot fix my problem.
I have what I think should be a pretty basic code to copy visible cells in one sheet, then paste values in the next sheet. I continue to get a run-time 1004 "PasteSpecial method of Range class failed". When the code runs in the document, I see the paste range (A1) highlighted, but then it bombs.
Does anybody see what I'm doing wrong?
Thank you.
I have what I think should be a pretty basic code to copy visible cells in one sheet, then paste values in the next sheet. I continue to get a run-time 1004 "PasteSpecial method of Range class failed". When the code runs in the document, I see the paste range (A1) highlighted, but then it bombs.
Code:
On Error Resume Next
With Range("EMPLOYEE_VISIBLE_RANGE").CurrentRegion
.Offset(1).Resize(.Rows.Count - 1).SpecialCells(12).Copy
End With
Err.Clear
ActiveWorkbook.Sheets("Sheet3").Range("A1").PasteSpecial xlPasteValues
Does anybody see what I'm doing wrong?
Thank you.