Hi All,
I'm writing a xlsx file directly from vb.net
I have a problem when I try to add a cell custom validation formula with this istruction:
The validationFormula above indicated is an semplified formula that I have try to used to solve my problem.HTML Code:Sub AddValidationFormula(byval range as range) dim validationFormula as string = "=mod(C2,F2)=0" range.Validation.Add(XlDVType.xlValidateCustom, XlDVAlertStyle.xlValidAlertStop, validationFormula) End Sub
When I run my code, it crashes with "exception from HRESULT: 0x800A03EC".
I have also tryed the italian Fornula ("=RESTO") but without result.
If I write the formula directly in the Excel file, I don't have any problem.
I have attached the stackTrace error
Can anyone help me?
Thanks
Marcello




Reply With Quote
