Adding calculated field from VBA in an Excel 2011 macro to a pivot table in an Excel 2003 book -
i have macro running in excel 2011 workbook manipulating pivot table in excel 2003 book. far haven't add issues adding or hiding fields.
i'm trying add calculated field (as here - http://msdn.microsoft.com/en-us/library/ff834479(v=office.14).aspx) , not working.
ws.pivottables("retailermgmt").calculatedfields.add "asp", " = tydsmtd/tyusmtd", false
gets me error 450 - wrong number of arguments or invalid property assignment.
when recorded same task, result was:
executeexcel4macro "(""retailermgmt"",1,""asp"",""=tydsmtd/tyusmtd"",true)"
which recorded , saved in 2003 file, i'm sure it's excel 2003 business (doesn't work when run 2011).
so, there way add calculated field pivot table in 2003 workbook macro being run in 2011 workbook?
thanks!
i ended finding easier save source data book .xlsx file within macro, dealing there.
Comments
Post a Comment