Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I am using a data validation list, if the user types in something other than what is available on the list an error pops up and advises the user to select from the drop down list. However, if the user goes to the field containing the drop down list and hits delete, the blank space is considered valid (why is this?). Is there a way to alert the user and bring them back to the drop down list if it is left blank? Each of the lists have default selections (which are not blank). Thanks! Sean |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You could force a default value with VBA. Suppose the cell with
validation is C1 and the default is 1. Put this code in the sheet's code module. Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$C$1" Then If IsEmpty(Target) Then Target = 3 End If End Sub Hth, Merjet |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() On Mar 14, 6:06 pm, "merjet" wrote: You could force a default value with VBA. Suppose the cell with validation is C1 and the default is 1. Put this code in the sheet's code module. Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$C$1" Then If IsEmpty(Target) Then Target = 3 End If End Sub Hth, Merjet Magnificent, works like a charm. Thanks a lot Merjet. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
drop down list shows first blank row after last list entry | Excel Discussion (Misc queries) | |||
drop down list starts from blank row | Excel Discussion (Misc queries) | |||
Drop Down List Ignore Blank | Excel Discussion (Misc queries) | |||
Ignoring Blank value in a drop down list | Excel Worksheet Functions | |||
Drop down list to return row number? | Excel Discussion (Misc queries) |