I have the following requirement where I need to create the pivot table.

1) The issue is when I execute the macro its successfully completed, but the Rows are not refreshed in the table. But if I execute step by step in edit mode, I'm getting the required output.

2) 1st time when I run the macro its giving " Run time error 1004", but second time its running fine

The input and the code are attachment with it

Private Sub Execute1_Click()

Dim WST As Worksheet, WSD As Worksheet
Dim PTCache As PivotCache
Dim pt As PivotTable
Dim objChart As ChartObject
Dim PRange As Range, rngChart As Range
Dim FinalRow As Long, Finalcol As Long
   
Set WSD = ThisWorkbook.Worksheets("sheet1")
Set WST = ThisWorkbook.Worksheets("sheet2")

' Delete any previous Pivot able
For Each pt In WST.PivotTables
    pt.TableRange2.Clear
Next pt

For Each chtObj In WST.ChartObjects
    chtObj.Delete
Next
'Define Input area and set up pivot Cache

FinalRow = WSD.Cells(Rows.Count, "B").End(xlUp).Row
Finalcol = WSD.Cells(1, Columns.Count).End(xlToLeft).Column

Set PRange = WSD.Cells(1, 1).Resize(FinalRow, Finalcol)

Application.Goto ThisWorkbook.Worksheets("sheet1").Range("A1"), True

Set PTCache = ThisWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:=PRange.Address)
Set pt = PTCache.CreatePivotTable(TableDestination:=WST.Range("A2"), TableName:="Table1")

'Turn off Update while Building the table
pt.ManualUpdate = True

Application.Goto ThisWorkbook.Worksheets("sheet2").Range("A2"), True

' Set up the PageFields
With pt.PivotFields("DM")
    .Orientation = xlPageField
    .Position = 1
End With

With pt.PivotFields("PM")
    .Orientation = xlPageField
    .Position = 1
End With

With pt.PivotFields("LOB")
    .Orientation = xlRowField
    .Position = 1
End With
        
With pt.PivotFields("Bus Score")
    .Orientation = xlDataField
    .Function = xlAverage
    .NumberFormat = "0.00"
    .Position = 1
    .Name = "Avg of Bus"
End With

With pt.PivotFields("Sys Score")
    .Orientation = xlDataField
    .Function = xlAverage
    .NumberFormat = "0.00"
    .Position = 2
    .Name = "Avg of Sys"
End With

With pt.PivotFields("Proc Score")
    .Orientation = xlDataField
    .Function = xlAverage
    .NumberFormat = "0.00"
    .Position = 3
    .Name = "Avg of Proc"
End With

End Sub