I could sequentially reproduce your problem on Windows10-64 / Excel2013-64. This is a mistake, we can only try to verify what exactly is going wrong.
When changing the table title via VBA, ListColumn stubbornly refuses to update its name. This happens whether you change the header cell or explicitly the name of the ListColumn! It is updated only if you edit the Workbook and change the cell manually, but not from VBA:
Public Sub Test() Dim oslide As Slide Set oslide = ActivePresentation.Slides.Add(1, ppLayoutBlank) Dim oshape As Shape Set oshape = oslide.Shapes.AddOLEObject(30, 30, 250, 250, "Excel.Sheet") With oshape.OLEFormat.Object .Sheets(1).ListObjects.Add 1, .Sheets(1).Range("B2:D5") ' <-- put it anywhere .Sheets(1).ListObjects(1).ListColumns(1).Name = "fewewq" ' <-- whether like this '.Sheets(1).Range("B2").Value = "fewewq" ' <-- or like this Debug.Print .Sheets(1).ListObjects(1).ListColumns(1).Range.Cells(1).Value 'fewewq Debug.Print .Sheets(1).ListObjects(1).ListColumns(1).Name ''''''''''''''' Still prints Column1 ! '''''''''''''''''' .Close End With End Sub
The result is obvious: the ListObject table is corrupted because it has internally stored column names (i.e. Column1 ) that it does not find in the header ( fewewq header). This leads to an observed error, the displayed error messages are not always accurate, unfortunately.
When the Excel instance is already running, behavior changes and updating the ListColumn name . It seems that the “component” that updates the internal data of the table when editing the header “does not load” when editing inside PowerPoint VBA. Only if:
A common factor is that some component of the editor is loaded there, and this editor is the one that updates the internal data of the table when editing the header.
The good workaround you found in your answer, which is to open xlApp before the action, then close it after, is consistent with these observations.
It is important to note that the “other” problem that occurs with the Chart object (in Update 1 ) is indeed the same problem that you are correct (“I assume the same problem”). The created chart is bound to the ListObject table on the sheet, and this table has its own title in the first row. Therefore, when you change the cell in the title, the ListColumn name ListColumn not updated, which leads to the same corruption problem.
UPDATE: Another Lightweight Workaround
After I had problems commenting on a workaround for a previous Excel application, I tried to find a “lighter” workaround and found it.
After making sure that the problem is due to the inability to update the ListColumn name in the table, I found a way to "force it" to update my names. The workaround consists of two stages:
Expand the range of the table one column to the right, and then immediately return it to the original range.
This operation simply causes the table to recalculate the column names and what it is! Now the table column names are correct and the problem has disappeared.
Public Sub Workaround() Dim oslide As Slide: Set oslide = ActivePresentation.Slides.Add(1, ppLayoutBlank) Dim oshape As Shape: Set oshape = oslide.Shapes.AddOLEObject(30, 30, 250, 250, "Excel.Sheet") With oshape.OLEFormat.Object.Sheets(1) .ListObjects.Add 1 ' xlRange .Range("A1").Value = "fewewq" '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Expand the table one column to the right than shrink it back ' With .ListObjects(1) .Resize .Range.Resize(, .Range.Columns.Count + 1) .Resize .Range.Resize(, .Range.Columns.Count - 1) End With ' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' End With With oshape.OLEFormat.Object Debug.Print .Sheets(1).ListObjects(1).ListColumns(1).Range.Cells(1).Value ' fewewq Debug.Print .Sheets(1).ListObjects(1).ListColumns(1).Name ' Now prints fewewq ! .Close End With End Sub
After this operation, you can verify that the built-in worksheet is editable, and you can close and then open the presentation and you will not find any problems. Hope this helps :)