C
Christian
Hi all,
I am using Exel 97 and I am trying to put a macro together that
refreshes a pivot table after new data is inputted. The data and the
pivot table is in worksheet 1. The pivot table can change size depending
on the number of cells with data in it. I have set up a button (or
should I say Exel automatically set up a button) called
"CommandButton1". This links to the following VBA:
Private Sub CommandButton1_Click()
ActiveSheet.PivotTables("PivotTable2").RefreshTable
End Sub
When I press the button I receive the following message:
Run time error '1004':
RefreshTable method of PivotTable class failed.
I have looked up some older threads and it looks like I am inputting the
correct coding but obviously I am not.
Someone's assistance will be greatly appreciated.
** Posted via: http://www.ozgrid.com
Excel Templates, Training, Add-ins & Business Software Galore!
Free Excel Forum http://www.ozgrid.com/forum ***
I am using Exel 97 and I am trying to put a macro together that
refreshes a pivot table after new data is inputted. The data and the
pivot table is in worksheet 1. The pivot table can change size depending
on the number of cells with data in it. I have set up a button (or
should I say Exel automatically set up a button) called
"CommandButton1". This links to the following VBA:
Private Sub CommandButton1_Click()
ActiveSheet.PivotTables("PivotTable2").RefreshTable
End Sub
When I press the button I receive the following message:
Run time error '1004':
RefreshTable method of PivotTable class failed.
I have looked up some older threads and it looks like I am inputting the
correct coding but obviously I am not.
Someone's assistance will be greatly appreciated.
** Posted via: http://www.ozgrid.com
Excel Templates, Training, Add-ins & Business Software Galore!
Free Excel Forum http://www.ozgrid.com/forum ***