Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Database refresh crash

Hello everyone,

Here is my problem. I have a macro that does the following:
1. downloads data from database to excel range
2. resizes excel ranges depending on the size of the database download
3. refreshes pivot tables based on newly resized ranges.

The problem is that when I run all 3 sections as one routine, the
macro keeps crashing and the message I'm getting is this:

Runtime Error '1004':
Microsoft excel cannot refresh a PivotTable until refresh of the
external data range on which the PivotTable is based is comlete.

I've tried to fix the problem by calling database download from one
routine and resize and refresh from another. Calling two separate
routines gave me the same error message. Also tried to pause the
application for 20 seconds after calling the database download to give
it time but that didn't help much either.

Routine runs fine when I execute it line by line by hitting F8.

Any ideas on how to fix it?

Thanks

Kate
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel crash when refresh pivottable which have parameters set on c Rui Rosa Mendes Excel Discussion (Misc queries) 1 December 31st 10 11:19 AM
Create refresh button in worksheet to refresh Pivot Table Data Ron Excel Worksheet Functions 1 October 13th 07 01:20 AM
Ridirect & Refresh data from access database widman Excel Discussion (Misc queries) 2 March 11th 06 06:29 PM
HELP! Lose Database Query upon Refresh Magela Excel Worksheet Functions 0 April 1st 05 09:11 PM
Excel does not close from VB!! (when i refresh Refresh query with BackgroundQuery:=False) Anant[_2_] Excel Programming 1 August 6th 03 04:22 AM


All times are GMT +1. The time now is 03:19 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"