Kristina96
New Member
- Joined
- Sep 30, 2019
- Messages
- 33
Hello everyone,
I want to add a dropdown list to a selection of cells. My code is adding a dropdown list to the cell but the list contains all the option as one. Meaning that instead of giving the chance to choose either option 1, option 2 or option 3 it gives only one option called "option 1; option 2; option 3".
My code:
Thank you in advance
Kristina
I want to add a dropdown list to a selection of cells. My code is adding a dropdown list to the cell but the list contains all the option as one. Meaning that instead of giving the chance to choose either option 1, option 2 or option 3 it gives only one option called "option 1; option 2; option 3".
My code:
Code:
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="option 1; option 2; option 3"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = "Title"
.ErrorTitle = ""
.InputMessage = _
"Test message" & Chr(10) & ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
Thank you in advance
Kristina