Erin
Erin

Reputation: 147

Paste without hitting enter

I'm trying to paste data (the .EntireRow.Select) into a new sheet ("Win") without having to hit Enter when choosing where to paste the data. I want the data to be pasted starting in column A, row one below the last row with entered data (lastRow is defined earlier in the code). Any advice? Thanks.

    If Archive = "Win" Then
        .EntireRow.Select
         Application.CutCopyMode = False
         Selection.Cut
            Sheets("Win").Select
            Range("A" & lastRow + 1).Select
         ActiveSheet.Paste

Upvotes: 0

Views: 395

Answers (2)

Erin
Erin

Reputation: 147

I was able to solve it using this code:

If Archive = "Win" Then
        .EntireRow.Select
        Selection.Copy
        Sheets("Win").Select
        ActiveSheet.Paste
        Sheets("Other").Select
        Selection.Delete
    End If 

Thanks!

Upvotes: 0

aLearningLady
aLearningLady

Reputation: 2088

I cleaned up your code a little:

If Archive = "Win" Then
    EntireRow.Cut
        Sheets("Win").Range("A" & lastRow + 1).Paste

Where are you running into issues?

Upvotes: 1

Related Questions