Create dropdown from dynamic list

 Blocked Profile -

I'm trying to make a Macro that can make a dropdown list from a dynamic list in column A. So far I've come up with the following code:

Sub Test()

Range("A1", Range("A65536").End(xlUp)).Name = "MyList"

Cells(1, 3).Select

With Selection.Validation
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="= & MyList"
.IgnoreBlank = False
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With

End Sub

However calling MyList doesn't work. Am i doing it wrong or does somone have another way of calling the named range.


1 reply


Please, bare in mind that before any answer given on the forum, you should know that there are volunteers who give their time trying to solve user problems. They do have a life other than this forum including me.

Therefore, it is specifically requested from Kioskea forum users to show their respect. For this, the use of polite expressions is a minimum.

To say please, thank you, appreciate, grateful, etc... is common courtesy when you want something, especially help!

You must copy, modify and repost your message respecting the politeness charter.

We trust that you understand.