dati.ods <http://nabble.documentfoundation.org/file/n4179030/dati.ods> Hy, i'm a new users and i ask for help to register in a calc sheet, a macro that inserts the values of two or more cells in a pie chart. I used the function " records macro" of Libre Office 5.0 and although the recording of the macro has selected the chart type (pie), the execution of the macro gives me a column chart. Enclose Example and the macro named "B" Thank you all sub B rem ---------------------------------------------------------------------- rem define variables dim document as object dim dispatcher as object rem ---------------------------------------------------------------------- rem get access to the document document = ThisComponent.CurrentController.Frame dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem ---------------------------------------------------------------------- dim args1(0) as new com.sun.star.beans.PropertyValue args1(0).Name = "ToPoint" args1(0).Value = "$B$2" dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args1()) rem ---------------------------------------------------------------------- dim args2(0) as new com.sun.star.beans.PropertyValue args2(0).Name = "By" args2(0).Value = 1 dispatcher.executeDispatch(document, ".uno:GoDownSel", "", 0, args2()) rem ---------------------------------------------------------------------- dispatcher.executeDispatch(document, ".uno:InsertObjectChart", "", 0, Array()) end sub -- View this message in context: http://nabble.documentfoundation.org/Calc-create-a-Macro-to-add-a-pie-chart-tp4179030.html Sent from the Users mailing list archive at Nabble.com. -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted