I would appreciate any insite on this issue. I'm trying to set up a simple validation cell and I think I'm doing it correctly but I keep getting the error Exception from HRESULT: 0x800A03EC.
The code that is causing the problem is as follows:
selection =Globals.ThisWorkbook.Application.get_Range("C3", missing); if (selection != null)
selection.Validation.Add(Excel.XlDVType.xlValidateList, Excel.XlDVAlertStyle.xlValidAlertStop, Excel.XlFormatConditionOperator.xlBetween, "One,Two,Three,Four,Five", "");
Todas las respuestas
I copied your codes into my ThisWorkbook_Startup method. Everything works fine in my side. Cell3 is restricted to be One to Five from the comboBox.
And in your side, which line throws the expcetion, get_Range or Validation.Add? Which language version of Office you are using? And, have you tried to install the latest service pack for Office, to see if this fixes the issue?
I am trying to add range validation on button click in VSTO Excel document-level addin. If I am using VBA button control and corresponding macro - no problems occur. But if I try to do it via Win Forms button control and VSTO - Exception from HRESULT: 0x800A03EC appear.
I am using ADO.NET to get appropriate values for validation list.
Would you help me to understand what is wrong?