I have several Powerpoint files being generated everymonth, these files have several charts with embedded excel tables behind them, for some month some series(columns) are full of zeros, I would like to find a Powerpoint Macro that goes into each chart looks on the embedded excel and deletes columns that are all zeros.
Now I have the code to do it in excel
Sub DeleteColumns()
Dim LR As Long, LC As Long
Dim i As Long, j As Long
LR = Cells.Find(What:="*", SearchDirection:=xlPrevious,SearchOrder:=xlByRows).Row
LC = 52
For j = LC To 1 Step -1
For i = LR To 1 Step -1
If Cells(i, j).Value = 0 Then
Columns(j).Delete
Exit For
End If
Next i
Next j
End Sub
And its working, I just dont know how to reference all the charts inside the powerpoint and then target the embedded excel tables behing them.
Many Thanks
Aucun commentaire:
Enregistrer un commentaire