Can anyone tell me what I am doing wrong?
I am trying to use a macro to populate a data validation list but I keep getting different errors, depending on my syntax. I am sure there is a simple solution, but I can't seem to figure it out. Here is my code:
Set Players = Sheets("Instructions").Range("C15:C17")
Range("H2").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:=Players
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
Thanks for your help
I am trying to use a macro to populate a data validation list but I keep getting different errors, depending on my syntax. I am sure there is a simple solution, but I can't seem to figure it out. Here is my code:
Set Players = Sheets("Instructions").Range("C15:C17")
Range("H2").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:=Players
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
Thanks for your help