Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
Sub Update_Graph(shtName As String, rngName As String, slideNum As String, shpName As String) Sheets(shtName).Range(rngName).Copy Dim myChart As Object Dim myChartData As Object Dim gWorkBook As Excel.Workbook Dim gWorkSheet As Excel.Worksheet Set myChart = objPres.Slides(slideNum).Shapes(shpName).Chart Set myChartData = myChart.ChartData myChartData.Activate Set gWorkBook = myChart.ChartData.Workbook Set gWorkSheet = gWorkBook.Worksheets(1) gWorkSheet.Range("A1").PasteSpecial Paste:=xlPasteValues Calculate Application.DisplayAlerts = False 'gWorkBook.Save gWorkBook.Close False Application.DisplayAlerts = True Set gWorkSheet = Nothing Set gWorkBook = Nothing Set gChartData = Nothing Set myChart = Nothing End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.