Lock Cell formatting (Arial 10) and borders

JCHuysamer

New Member
Joined
Nov 3, 2015
Messages
43
Hi

Can anyone please assist

I am compiling a new template that will be given to our service providers to complete and list their job activities, safety mitigation and so on and so forth.

I am 99% done (with a lot of help from some of the guys on this forum) but have one last hurdle I cant crack :oops: .


The service providers have done a lot of these documents and used to just copy relevant info from their previous forms and past into the new one.
The problem I have is that when they copy (from their previous documents) and paste in a cell it overwrites my default cell format and border.(unless they paste it in the formula bar)

Is there any way one can lock the entire document so that when they enter text it will be in Arial 10 (I have set the default and this part works fine) and if they paste (CTRL+V or right click, Paste) info into a cell it will only paste the info and not the properties of the original cell (ie.: change the properties of the new info to Arial 10 and not adjusting the borders).
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
The following code put into the ThisWorkbook section sorts out the font:

Code:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
With Target.Font
    .Name = "Arial"
    .Size = 10
End With
End Sub

Not sure (yet!) how to do the borders!
 
Last edited:
Upvote 0
I've since found an article on the internet which gives some code: VBA Excel
The basis of it seems to be that every time a change is made to the workbook, the macros check to see whether the change is a paste. If it is, the paste is undone, and the contents of the clipboard are re-pasted as values.

Good luck!
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,120
Members
451,399
Latest member
alchavar

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