Quote:
How to create dropdownlist with source from another sheet in excel using VB.NET
Since Interop is used to remote control Excel, it have Excel limitations, and Excel (at least on hold versions) do not allow what you want to do (at least directly).
Excel do not allow droplists with an explicit reference to another WorkSheet.
The workaround is to define a name for the range of list and use it as drop formula.
it look like:
xlApp.ActiveWorkbook.Names.Add Name:="MyList", RefersTo:="=Sheet2$A$1:$E$1"
With xlApp.Selection.Validation
.Add(Type:=Excel.XlDVType.xlValidateList, _
AlertStyle:=Excel.XlDVAlertStyle.xlValidAlertStop, _
Operator:=Excel.XlFormatConditionOperator.xlBetween, _
Formula1:="=MyList")
.IgnoreBlank = True
.InCellDropdown = True
End With