Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Would someone be so kind and make a test for me please
Please create new workbook and in new sheet set validation data for list i.e. 1;2;3 for cells E2:E10. Unlock the cells E2:E10. Then put following the code in sheet ------------------ Sub Worksheet_Change(ByVal Target As Range) If HasValidation(Range("E2:E10")) = False Then Application.Undo MsgBox "Operation Canceled", vbCritical ' Else Exit Sub End If End Sub 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 --------------------- After that try to copy (on unprotected sheet) value form blank cell A1 and paste it in E2. It should be blocked with message operation canceled. If that works try to do the same with sheet protected. It it works only me have the problem. If not there is something bigger :) Thanks in advance PAT |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Autofilter not working on protected sheet. | Excel Discussion (Misc queries) | |||
Filters not working on Protected sheet | Excel Discussion (Misc queries) | |||
Hyperlinks not working after sheet is protected.... | Excel Discussion (Misc queries) | |||
How to have Autofilter working in a protected sheet? | Excel Programming | |||
formulae have stoped working on an excel sheet | Excel Worksheet Functions |