ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Validation (https://www.excelbanter.com/excel-programming/393864-validation.html)

Sandy

Validation
 
Is there any way I can add a default value of "Hit" to the following
Sandy

With .Validation
.Delete
.Add Type:=xlValidateList, Formula1:="Hit,Miss"
.IgnoreBlank = True
.InCellDropdown = True
End With



Bob Phillips

Validation
 
Load the cell value with Hit.

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Sandy" wrote in message
...
Is there any way I can add a default value of "Hit" to the following
Sandy

With .Validation
.Delete
.Add Type:=xlValidateList, Formula1:="Hit,Miss"
.IgnoreBlank = True
.InCellDropdown = True
End With




Sandy

Validation
 
Not quite that simple. The original values in the range C20:F40 are loaded
as "Hit". Values that are input into C6:F6 then control the placement of a
drop down list. In other words if the value in C6 is such that neither "Hit"
nor "Miss" is appropriate then the value of "Neither" is inserted into cell
C20 otherwise the validation list below is inserted. (Carried out by a
Worksheet_Change event.)
The problem is that if the value in C6 is changed, meaning the value in C20
must now be either "Hit or "Miss", the validation drop-down is correctly
inserted but the value on display still shows as "Neither" - does this make
sense?
Sandy

"Bob Phillips" wrote in message
...
Load the cell value with Hit.

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)



"Sandy" wrote in message
...
Is there any way I can add a default value of "Hit" to the following
Sandy

With .Validation
.Delete
.Add Type:=xlValidateList, Formula1:="Hit,Miss"
.IgnoreBlank = True
.InCellDropdown = True
End With






Bob Phillips

Validation
 
Not to me.

Can you show all the code?

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Sandy" wrote in message
...
Not quite that simple. The original values in the range C20:F40 are loaded
as "Hit". Values that are input into C6:F6 then control the placement of a
drop down list. In other words if the value in C6 is such that neither
"Hit" nor "Miss" is appropriate then the value of "Neither" is inserted
into cell C20 otherwise the validation list below is inserted. (Carried
out by a Worksheet_Change event.)
The problem is that if the value in C6 is changed, meaning the value in
C20 must now be either "Hit or "Miss", the validation drop-down is
correctly inserted but the value on display still shows as "Neither" -
does this make sense?
Sandy

"Bob Phillips" wrote in message
...
Load the cell value with Hit.

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)



"Sandy" wrote in message
...
Is there any way I can add a default value of "Hit" to the following
Sandy

With .Validation
.Delete
.Add Type:=xlValidateList, Formula1:="Hit,Miss"
.IgnoreBlank = True
.InCellDropdown = True
End With









All times are GMT +1. The time now is 10:03 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com