Hi,
I am trying to create a drop down menu in a specific cell on a sheet using a macro. The named list is on a hidden sheet. I am using the following code but it is giving me an error: "Application-defined or object-defined error. " #1004
Sub Add_Drop_Down_Menu_Cell(ByVal menuList As Range)
With ThisWorkbook.Sheets("Filtered Data").Range("B5").Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, Formula1:="=menuList"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
End Sub
The error is being generated by the .Add part of the code. Can anyone please help me resolve this? Thank you.
Bookmarks