ActiveSheet.Name = "RReal+RCEmin"
Dim UltimaFila As Long
Dim RangoDatos As String
UltimaFila = Cells(Rows.Count, 3).End(xlUp).Row
RangoDatos = "RReal+RCEmin!R1C1:R" & UltimaFila & "C9"
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:=RangoDatos, Version:=xlPivotTableVersion8).CreatePivotTable TableDestination:="RReal+RCEmin!R1C15", TableName:="D1", DefaultVersion:=xlPivotTableVersion8
I have tried to create the table using every version but it does not work.
Try wrapping your sheet names within single quotes...
Here's another way...
As you can see, it creates the PivotCache and the PivotTable in two steps.