Yes, it would. You want it to refresh authomatically, so it has to be an event triggered event, otherwise you run it as a normal module. The event is a change you make to your source data. If you wish to refresh more than one pivot source, you need to put your code in to "This workbook". Try this code. Put it in the sheet name- source data. The pivot will refresh automatically when ever you make any change in your source data.
Please adjust the code as per your data, or change the name of your table to ("PivotTable1").
Bookmarks