Validation

S

Sandy

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
 
B

Bob Phillips

Load the cell value with Hit.

--
---
HTH

Bob

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

Sandy

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
 
B

Bob Phillips

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Find the Empty Cell Macro 9
i to = column in Formula 19
Runtime error 438 3
Slow code 2
VBA triggers on tabkey 8
Read a range into an array 9
Protect Cells 3
Macro to set new data validation each time 2

Top