I am trying to write a macro that calls up a named validation (drop down) list based in a particular cell based that cell is a certain value. For example, I have named the list "MailRef" and would like the drop down to appear in cell "B2" if the value of "B4" reads "Letter".
I am using excel 2003 - Any help on this would be much appreciated.
I have so far tried the following code:
Sub CallValidation()
With Sheets("Mail Out")
If Range("D2") = "Offer" Or Range("D2") = "Quote" Then
With Range("B2").Validation
.Delete
.Add Type:=x1ValidateList, Formula1:="=MailRef"
End With
End If
End With
End Sub
Thanks.
I am using excel 2003 - Any help on this would be much appreciated.
I have so far tried the following code:
Sub CallValidation()
With Sheets("Mail Out")
If Range("D2") = "Offer" Or Range("D2") = "Quote" Then
With Range("B2").Validation
.Delete
.Add Type:=x1ValidateList, Formula1:="=MailRef"
End With
End If
End With
End Sub
Thanks.