Thanks JANR
I got the immediate window. But can you please suggest what should be the code if I am linking Access Data to Excel File as "Table" & not as "Pivot Table", because when I am running the code it is showing the following error:-
Run-time error '1004'
Unable to get the PivotTables...