i have 2 workbooks, 1 has a lot of tabs with Web querys, the other is pivots off of the main tab in the first workbook. the reason they aren't all in one workbook is because the file would be too big to email. What i'm trying to create is a macro in the pivot table workbook that is a refresh data button where when it's pushed, the first workbook opens, the web queries update, then the pivot tables in the first workbook update, then all the pivots in the 2nd workbook update, then the 1st workbook is saved and closed.

challenges: 1. the filename of the first workbook- everyone seems to have the server on a different drive. 2. the macro isn't waiting for the 1st workbook to finish its web query before closing. 3. currently, the first workbook opens and refreshes, i'd rather it opened in the background so people couldn't see it.

here's the code, any help is appreciated:

Please Login or Register  to view this content.