{"id":8171,"date":"2021-11-26T13:28:54","date_gmt":"2021-11-26T13:28:54","guid":{"rendered":"https:\/\/lgildv5i97.onrocket.site\/answers\/?post_type=question&#038;p=8171"},"modified":"2021-11-26T13:29:17","modified_gmt":"2021-11-26T13:29:17","slug":"powerpoint-chart-data-source-set-with-vba","status":"publish","type":"question","link":"https:\/\/computing.net\/answers\/programming\/powerpoint-chart-data-source-set-with-vba\/30012.html","title":{"rendered":"Powerpoint Chart Data Source &#8211; Set With VBA"},"content":{"rendered":"<p>Say I have a powerpoint presentation with two slides.<br \/>\nSlide 1 has an excel object embedded in it &#8211; not linked.<br \/>\nSlide 2 has a chart.<br \/>\nWhat VBA code would I need to modify the data source of the chart to point to a range on the excel object on slide 1.<\/p>\n<p>eg.<br \/>\nchart.data = slide(1).Excel.Sheet(&#8220;Year2014&#8221;).Range(&#8220;A1:C12&#8221;)<br \/>\nOr<br \/>\nchart.data = slide(1).Excel.Sheet(&#8220;Year2013&#8221;).Range(&#8220;A21:C32&#8221;)<\/p>\n<p>The sheet name and range are not fixed.<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"iawp_total_views":2},"question-category":[55],"question_tags":[],"class_list":["post-8171","question","type-question","status-publish","hentry","question-category-programming"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question\/8171","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question"}],"about":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/types\/question"}],"author":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/comments?post=8171"}],"wp:attachment":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/media?parent=8171"}],"wp:term":[{"taxonomy":"question-category","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question-category?post=8171"},{"taxonomy":"question_tags","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question_tags?post=8171"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}