VBA to cut and paste to destination format

Livin404

Well-known Member
Joined
Jan 7, 2019
Messages
743
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Good evening, I have a simple VBA where I can have the use Cut and Paste (Ctrl-v) and ensure the Format is kept on the destination worksheet rather than the source format. I appears to work fine, but I notice the user could still right click see the paste option and end up using the source format. Is there a way I can lock pasting options, so "ONLY" the destination format can be used? The VBA I used is.

Thank you,

VBA Code:
Sub PasteWithDestinationFormatting()

ActiveCell.PasteSpecial (xlPasteValues)

End Sub
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
You could use Application.CutCopyMode = False after your code to clear the clipboard which will prevent any further paste of the data.
 
Upvote 0

Forum statistics

Threads
1,215,484
Messages
6,125,066
Members
449,206
Latest member
Healthydogs

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