Excel Drop Down List

I am trying to create a dropdown list for an Excel column from table data in Navision. I have created the following function in table 370 Excel Buffer, but the Validation.Add method will not except a parameter for the formula, works if formula is assigned a text constant…does anyone know how to resolve the Excel error. SetDropDownList(SheetName : Text[30];StartColumn : Text[30];EndColumn : Text[30];ListString : Text[1024]) TempXlWorkSheet := XlWorkBook.Worksheets.Item(SheetName); xlValidateList := 3; //Defined as Variant xlValidAlertStop := 1; //Defined as Variant xlBetween := 1; //Defined as Variant Formula1 := ‘Mon,Tue,Wed,Thu,Fri’; //Defined as Variant //Formula1 := ListString; xlValidation := TempXlWorkSheet.Range(StartColumn + ‘:’ + EndColumn).Validation; WITH xlValidation DO BEGIN Delete; //VBA Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, Formula1:=‘Mon,Tue,Wed,Thu,Fri’, Formula2:=’’ //Add(xlValidateList, xlValidAlertStop, xlBetween, Formula1); //Causes Navision to crash //Add(3, 1, 1, ‘Mon,Tue,Wed,Thu,Fri’); //This line creates dropdown list Add(3, 1, 1, Formula1); //This line returns Excel error HRESULT -2147352567, no exception description provided IgnoreBlank := TRUE; InCellDropdown := TRUE; InputTitle := ‘’; ErrorTitle := ‘’; InputMessage := ‘’; ErrorMessage := ‘’; ShowInput := TRUE; ShowError := TRUE; END;

If this works://Add(3, 1, 1, 'Mon,Tue,Wed,Thu,Fri'); //This line creates dropdown list then won’t this work:Add(3, 1, 1, Formula1);provided Formula1 is declared as Text?