Excel geeks; is there any way to prevent pasting over data - TopicsExpress



          

Excel geeks; is there any way to prevent pasting over data validation without having to resort to macro enbled workbooks and using Microsoft Visual Basic? The only way I can see its possible is doing this (but I dont want to): Private Sub Worksheet_Change(ByVal Target As Range) Does the validation range still have validation? If HasValidation(Range(ValidationRange)) Then Exit Sub Else Application.Undo MsgBox Your last operation was canceled. & _ It would have deleted data validation rules., vbCritical End If End Sub Private Function HasValidation(r) As Boolean Returns True if every cell in Range r uses Data Validation On Error Resume Next x = r.Validation.Type If Err.Number = 0 Then HasValidation = True Else HasValidation = False End Function
Posted on: Mon, 01 Sep 2014 15:36:10 +0000

Trending Topics



Recently Viewed Topics




© 2015