Create pivot tables and charts in a Macro using VBA

  • Hi guys, I am trying to create charts and pivot tables from a Macro that gives me a DataBase, my problem is that this Database is variable because is a Macro and depends of another files, so

    I don´t know how to make that these charts change everytime I run the Database macro.