Stop pasting

  • Thread starter Thread starter Salza
  • Start date Start date
S

Salza

Hi all,

How to stop users from pasting a text/number into an unprotected cell?
Please help. Thanks.

Regards,
Salza
 
Salza

You could set up a Worksheet_SelectionChange() event. The code below will
stop a user pasting in cell C5 of the worksheet behind which the code
resides

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("C5")) Is Nothing Then
Application.CutCopyMode = False
End If
End Sub
 
Depending on what your critria is you may be able to use
validation on the DATA menu

Deb
 
Don't think so... Pasting into a cell overwrites the validation.
 
Data Validation does not stop users from pasting invalid data into a cell.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

AVOID UPPER CASE 2
Excel Macro-enabled Workbook 2
Merge Text From Two Cells 2
Dialogue box too wide 2
Protect Cells 10
Code to Automatically Enable Macro 4
Passing Grade 2
Fixing Date Format 6

Back
Top