I was trying to find an Excel VBA code that reads validation list into a variable.
I'm using Excel 2010 version.
In the code below I'm dynamically setting up values using variable qNR, and appears in dropdown menu. Later I need to read values in validation list, remove or update certain values and set new values.
I cannot find any example code that reads validation list into a variable.
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:=qNR
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
Thank you!