Replace the paste function with past special value

sheridan1234

New Member
Joined
Aug 9, 2012
Messages
3
I created a spreadsheet many years ago for my work place to assist with generating weekly paperwork. All the information in the spreadsheet is used in a mail merge to generate the weekly paperwork.

My issue is this, starting last year we got a few stubborn new employees that refuse to use paste special on their own when copying information into the spreadsheet. As a result, when they paste data into the spreadsheet it erases all my underlying formulas and conditional formatting.

I need a way to disable the paste function and replace it so that anytime someone tries to paste something into the spreadsheet (by key command or mouse) it will paste special the values only and leave all my other formatting intact.

I've tried searching around on this site but I sill can't find an example where I set this up for the entire spreadsheet.

Thanks for any help,
Shane.
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Take a look at this thread, which is similar to your question. The recommendation was to "disable normal pastes then use a Custom Menu that is attached to Recorded Macro that ONLY paste Values."
 
Upvote 0
I had the same issue recently and this solution fit my purposes best: http://www.mrexcel.com/forum/showth...Special-Values&p=263183&viewfull=1#post263183

*EDIT
Basically, you need to right-click on the sheet and select View Code, then paste this code in to the VB editor and save. (Edited this post as unsure of your knowledge level, so thought I'd better clarify!)

Code:
Private Sub Worksheet_Change(ByVal Target As Excel.Range)''http://www.mrexcel.com/forum/showthread.php?56674-Force-Paste-Special-Values&p=263183&viewfull=1#post263183
''Forces Paste Values instead of paste to maintain formatting


If Application.CutCopyMode = xlCopy Then


Application.EnableEvents = False


Application.Undo
Target.PasteSpecial Paste:=xlPasteValues


Application.EnableEvents = True


End If


End Sub
 
Last edited:
Upvote 0
I had the same issue recently and this solution fit my purposes best: Force Paste Special Values

*EDIT
Basically, you need to right-click on the sheet and select View Code, then paste this code in to the VB editor and save. (Edited this post as unsure of your knowledge level, so thought I'd better clarify!)

Code:
Private Sub Worksheet_Change(ByVal Target As Excel.Range)''http://www.mrexcel.com/forum/showthread.php?56674-Force-Paste-Special-Values&p=263183&viewfull=1#post263183
''Forces Paste Values instead of paste to maintain formatting


If Application.CutCopyMode = xlCopy Then


Application.EnableEvents = False


Application.Undo
Target.PasteSpecial Paste:=xlPasteValues


Application.EnableEvents = True


End If


End Sub

I have tried and tried to use the codes that I have found but none seem to work.

Perhaps I am not inputting these codes correctly.

Could someone please take the time to walk me through step by step on how to input this stuff (give me directions as if I were the stupidest person on the planet please)

Thanks
 
Upvote 0
I think I know what some of the issues with the provided codes are now. They work fine as far as workbook to workbook pasting goes but if you copy some information from a web page, the code does not enforce the paste value function. Does anyone have any suggestions about how to rework the code to get it work when pasting from a webpage?

Thanks
 
Upvote 0

Forum statistics

Threads
1,215,026
Messages
6,122,743
Members
449,094
Latest member
dsharae57

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