Team ,
I have 2 problems.
First I need to only have a single ppt open (2 charts are updated with the same cell in Excel.
Second the Slide needs to be updated when a change occurs
'For j = 0 To (varSize - 1)
'pPreso.Slides(2).Shapes(var(i)).LinkFormat.Update
Is the code that is causing error and not updating the slide.
Thank you,
I have 2 problems.
First I need to only have a single ppt open (2 charts are updated with the same cell in Excel.
Second the Slide needs to be updated when a change occurs
'For j = 0 To (varSize - 1)
'pPreso.Slides(2).Shapes(var(i)).LinkFormat.Update
Is the code that is causing error and not updating the slide.
VBA Code:
Sub Refresh(ParamArray var() As Variant)
'Declare powerpoint app
Dim pApp As PowerPoint.Application
Set pApp = New PowerPoint.Application
pApp.Visible = True
'Connect to current Powerpoint app
pApp.Presentations.Open (ActiveWorkbook.Path & "\Dashboard.pptx")
'On Error Resume Next
Dim pPreso As PowerPoint.Presentation
Set pPreso = pApp.ActivePresentation
'Update every chart (slide 1) in Param Array
Dim varSize As Integer
Dim i As Integer
Dim j As Integer
varSize = UBound(var) - LBound(var) + 1
For i = 0 To (varSize - 1)
pPreso.Slides(2).Shapes(var(i)).LinkFormat.Update
Next i
'For j = 0 To (varSize - 1)
'pPreso.Slides(2).Shapes(var(i)).LinkFormat.Update
End Sub
Thank you,