At Tuesday 28/6/2005 06:03, Capiez Fabrice wrote: >chart.Location (Where=constants.xlLocationAsObject, >Name=sheet.Name) >try: > chart.HasTitle = True > chart.ChartTitle.Characters.Text ="title" > >The following produces: > >Excel failed with code -2146827864: OLE error 0x800a01a8 >No extended information > >The same error occurs if I try to set an axis title >instead of the chart's title. It also occurs whether I >first set chart.HasTitle to True or not. I
Error 800a01a8 is "Object required" The error is triggered by the chart.HasTitle line, before setting the title text. So I guessed, chart does not point to a valid object on that line. Commenting out the previous line chart.Location(...) solved the problem. I was unable to find documentation on the Location() method, but I guess that moving the chart to another sheet invalidates the object reference (which may be tied to its current location...) Gabriel Genellina Softlab SRL _______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32