Bonjour à toutes et à tous,
Je n'arrive pas à comprendre ce qui génère l'erreur Indice hors limites (Erreur 9)
Une personne aguerrie pourrait-elle me l'expliquer ?
Merci par avance de toute l'aide que vous pourrez m'apporter
Eliotte
Portion de code concernée :
Option Explicit
Option Base 1
Const Template As String = "Template1.potm"
Const PrezGenerated As String = "Prez"
Const PrezFormat As String = ".potm"
Const FolderLayout As String = "\Toto\Template\"
Const FolderPrez As String = "\Toto\Prez\"
Public Source As Object, ParamFinder As Object, ParamTable() As Variant, PathFileLayout As String, PathSavePrez As String
Public ListItem
Sub XlToPpt()
Dim PPapp As Object, PPpres As Object, PPSlide As Object, Path As String
Dim XLws1 As Worksheet, MyArrayXLMaster() As Variant, XLObjExport() As Variant
Dim i As Long, ii As Long, y As Long
PathFileLayout = ThisWorkbook.Path & FolderLayout & Template
PathSavePrez = ThisWorkbook.Path & FolderPrez & PrezGenerated & "-" & Format(Date, "mmddyyyy") & "-" & Format(Time, "hhmmss") & PrezFormat
Set Source = Worksheets("Dashboard")
ListItem = Source.DashboardList.Value
Set ParamFinder = Worksheets("DataXLToPpt")
ParamTable = ParamFinder.ListObjects("E2PObjectDataTable").DataBodyRange.Value
Set PPapp = CreateObject("PowerPoint.Application")
FileCopy PathFileLayout, PathSavePrez
Set PPpres = PPapp.Presentations.Open(PathSavePrez)
PPapp.WindowState = 2
PPapp.ActiveWindow.ViewType = 7
For i = LBound(ParamTable) To UBound(ParamTable)
MyArrayXLMaster = ParamFinder.ListObjects(ParamTable(i, 1)).DataBodyRange.Value
Next i