Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP Runtime error 1004 Paste Area Issues

Status
Not open for further replies.

9806102

Programmer
Aug 21, 2009
6
US
Hello Experts,

I am having a issue with a Excel Macro that is going back and forth between sheets and copy and pasting columns using the find function. I am runnign into this runtime error 1004 - somthing about the paste area not being the same? Below is my code:

Dim paste_cell As String
Dim copy_cell As String
pv_ModeNotFound = False

Sheets(Sheet).Select
Cells.Find(Award_Col_Heading, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False).Activate
copy_cell = Cells(ActiveCell.Row + 1, ActiveCell.Column).Select
If ActiveCell <> "" Then
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("SOE Macro Output").Select
Cells.Find(SOE_Col_Heading, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False).Activate
pv_last_row = Cells(60000, ActiveCell.Column).End(xlUp).Row
paste_cell = Cells(pv_last_row + 1, ActiveCell.Column).Select
'Selection.PasteSpecial paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:=
'False, Transpose:=False
ActiveSheet.paste
Else
pv_ModeNotFound = True
End If

End Sub

and it is erroring out at the line ActiveSheet.paste. What I believe is happening is that it is losing what it copied but not sure how to fix it. Have been looking at the computer screen for what seems like hours. Any help would be wonderful.

Thank you!
Amanda Mae
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top