Update PivotCache
I have a workbook (wbStat) that gathers statistics from data on another
workbook (wbDb). In wbStat I have a Pivot table based on data from wbDb. The problem I'm experiencing is when I try to update the Pivot table. I use the following code in wsStat: ....... Application.ScreenUpdating = False openDbr ' Opens wsDb wb.Worksheets("Stats").PivotTables("Stat").PivotCa che.Refresh wbDb.Close (False) Application.ScreenUpdating = True ....... The code works fine when I open the spreadsheet directly using Excel. However, I have a link on the Intranet that opens up the spreadsheet. When using this link the above code does not work. I'm prompted to type the password for wsDb (window does not appear when wsStat is opened directly in Excel) and then following error message; Run-time error '1004' I get this error message regardless if I type the correct password or not. I have changed the settings for *.xls files to make sure that the workbook is opened in a separate window (not an IE window because then none of the macros work). Could there be some other Internet/file option that I have to change in order to get this to work? Thankful for any ideas! /Jonas |
All times are GMT +1. The time now is 05:15 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com