Hey all -

I'm brand new to this so be patient with me, I have a lot to learn! I'm excited to join the programming club, so far it has been awesome!

I have created a command button to refresh my pivot table and it works fine. However, in the future I plan on adding new lines to my data set and by simply refreshing the pivot table it will leave them out. I don't want to have to go back and change the data source each time I add a line, so I want my button to do this for me. Here is my current code.

Public Sub RefreshPivot()
ActiveSheet.PivotTables("PivotTable1").RefreshTable
End Sub

The data set starts on sheet2, cell A9. The furthest to the right it will go is cell CO. I will be adding lines to the bottom of the data set, so how can I get my button to recognize I have added lines, and include it on my table?

Any help would be appreciated! Thanks!

TBO