pothuri Posted November 8, 2004 Posted November 8, 2004 hi... I am using excel object in my windows application and use the worksheetfunctions in my vb code. The statement below works fine when run using excel object 11.0 but when i program my application using excel object 9.0 the same statement gives an error saying type mismatch. I think in older version the Covar function has a problem in taking ranges as arguments. dim cl1,cl2 as excel.range dim oxl as excel.application cl1=worksheet1.columns(i) cl2 = worksheet1.Columns(j) statsheet1.Cells(i, j).value = oXL.WorksheetFunction.Covar(cl1.Value, cl2.Value) i would appreciate if anyone could help me figure this one out. thnx Quote
Mike_R Posted November 9, 2004 Posted November 9, 2004 Compatibility below Excel 10.0 is difficult for there are no PIA's available and no official MSFT support. Somee have reported sucess automating down to Excel '97 (XL 8.0) by using Late Binding, which therefore implies that you have to use 'Option Strict Off'. As for this function, itself, I don't know. You are passing in Range.Value, so technically this is a 2D Array that you are passing in, so it should be fine. :( Sorry that I don't have a lot of ideas here... Although, you could try passing in the Range's directly (instead of Range.Value) and see if that works... Quote Posting Guidelines Avatar by Lebb
Recommended Posts