I am getting following error for the Macro I have created to insert Pivot table.
It was working before without any problem, I didn’t change anything.
Here is the Error

Here is my code
Cells.Select
Sheets.Add.Name = "Detail"
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"Log!R1C1:R65536C11", Version:=xlPivotTableVersion10).CreatePivotTable _
TableDestination:="Detail!R3C1", TableName:="PivotTable1", DefaultVersion _
:=xlPivotTableVersion10
Sheets("Detail").Select
Cells(3, 1).Select
The error is indicating that you have an untitled column(s). Go back and make sure none of the columns in the SourceData range (i.e. columns 1 to 11) have a blank header.