Refreshing a Pivot Table through code


Posted by Mike on September 06, 2001 4:50 AM

I have this excel sheet that contains a pivot table. Through VBA code I open a text file in Excel, format it and refresh the pivot table from this data. When I run this on a desktop all is well. When I run the Excel sheet from the server it tells me it cannot open the pivot table source file, however, when the runtime error pops up, the source file is clearly open in Excel. When this pivot table was created originally, it was created on a desktop. Is there anything I should be looking at. Any ideas would be appreciated.



Posted by Mike on September 06, 2001 11:04 AM

I accidentally figured this out. After I moved the excel file containing the pivot table to the server I went and highlighted the pivot table and right-clicked to run the wizard. The wizard kept the path to the data file the same except for the drive letter. Since I put this on the M drive it was looking for M:\My Documents. Undocumented Feature?