Problem with Pasting

rholdren

Board Regular
Joined
Aug 25, 2016
Messages
140
Office Version
  1. 365
  2. 2019
Good Morning,

I seem to be having an issue getting the following to post. Everything runs fine until it gets to the Selection.Paste (Highlighted in blue)
I've tried variations and the only time it will paste is if I add Selection.Cut but I need to leave the original data in place on the Issues Log Tab.

Thanks
Sub Post_B()
Sheets("Issue Log").Select
Dim LastRow As Long, MyCell As Range
For Each MyCell In Range("S4:S" & [S5000].End(xlUp).Row)
Columns("S:S").Select
Selection.Find(What:="B", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate

ActiveCell.Offset(0, -18).Select
ActiveCell.Select
ActiveCell.Resize(, 19).Select
Selection.Copy
Application.CutCopyMode = False
Selection.Cut (If added it will paste)
Sheets("Both").Select
ActiveSheet.Select
Range("A4").Select
Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False

Sheets("Issue Log").Select
Next MyCell
End Sub
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Move this line
Code:
Application.CutCopyMode = False
to the end of the code
 
Upvote 0
That works. Thanks. I really appreciated it. I am getting old, I didn't even notice that.
 
Upvote 0
Glad to help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,182
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top