Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How can a cell with a data validation drop down box not allow users to paste
into the cell. When they paste, it allows values not in the drop-down list. However the user cannot free-type into the cell anything not in the drop-down list. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
That's a shortcoming of data validation that you will have to live with, no workaround AFAIK. Mike "MFTiger" wrote: How can a cell with a data validation drop down box not allow users to paste into the cell. When they paste, it allows values not in the drop-down list. However the user cannot free-type into the cell anything not in the drop-down list. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Nov 19, 8:41*pm, MFTiger wrote:
probably, box itself is limited to the list |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you are happy to use a macro you may be able to use Worksheet_Change event
to test user input. Following code not tested but something along these lines may do what you want: Private Sub Worksheet_Change(ByVal Target As Range) Dim rng As Range Dim Found As Range With Target 'row / col of validation list 'change as required If .Column = 6 And .Row = 7 And .Value < "" Then 'list range 'change as required Set rng = Range("C7:C12") Set Found = rng.Find(Target.Value) If Found Is Nothing Then MsgBox "Input Not Valid" With .Validation .Delete .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _ xlBetween, Formula1:="=$C$7:$C$12" 'change as required .IgnoreBlank = True .InCellDropdown = True .InputTitle = "" .ErrorTitle = "" .InputMessage = "" .ErrorMessage = "Input Not Valid" .ShowInput = True .ShowError = True End With .ClearContents End If End If End With End Sub it's a bit messy perhaps others may be able to offer a cleaner solution. -- jb "MFTiger" wrote: How can a cell with a data validation drop down box not allow users to paste into the cell. When they paste, it allows values not in the drop-down list. However the user cannot free-type into the cell anything not in the drop-down list. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Validation Data using Validation Table cell range..... | Excel Discussion (Misc queries) | |||
Data validation vs. cutting pasting | Excel Discussion (Misc queries) | |||
Data validation when pasting data | Excel Programming | |||
Why does data validation not work when pasting data into a cell. | Excel Discussion (Misc queries) | |||
Pasting on Filtered Data Sheets without pasting onto hidden cells | Excel Discussion (Misc queries) |