Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-28-2012, 07:57 AM
Jirik61 Jirik61 is offline Refresh of data from external source Windows XP Refresh of data from external source Office 2007
Novice
Refresh of data from external source
 
Join Date: Apr 2012
Posts: 8
Jirik61 is on a distinguished road
Unhappy Refresh of data from external source

I have sheet with formulas for retrievieng external data (OLAP cubes). If any user changes parameters of report (month, department) data are refreshed automatically. But the running macro does not wait until the data are refreshed completely.


Is there any command or any other solution how to stop the macroexecution until the refresh is finished?
Or do you have any experience with the data refresh?

Jirik
Reply With Quote
  #2  
Old 07-03-2012, 04:31 AM
macropod's Avatar
macropod macropod is offline Refresh of data from external source Windows 7 64bit Refresh of data from external source Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi jirk,

A crude but effective way is to insert a timed delay into the code. Depending on what code you're using to retrieve the data, you might be able to do something more sophisticated by testing the update state.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 07-13-2012, 07:53 AM
Jirik61 Jirik61 is offline Refresh of data from external source Windows XP Refresh of data from external source Office 2007
Novice
Refresh of data from external source
 
Join Date: Apr 2012
Posts: 8
Jirik61 is on a distinguished road
Default

Dear Paul,

Thank you for your hint, I made some test in the past and used a couple of commands for delay or wait until keypress, but I failed.
For instance - when I used the MsgBox statement, the aplication update nothing until I press the key...

for refresh I used :

Application.Calculation = xlManual
mustek.RefreshAll
Application.Calculation = xlAutomatic


and then :

Application.Wait (Now + TimeValue("0:00:20"))


or : MsgBox "Akualizce", vbOKOnly

If I debug the application (Step Into) the data are refreshed correctly, and I am not able to make a "step forward" until the data are refreshed completely.
Do you have any idea?

Thanks!
Jirik
Reply With Quote
  #4  
Old 07-13-2012, 01:40 PM
macropod's Avatar
macropod macropod is offline Refresh of data from external source Windows 7 64bit Refresh of data from external source Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

From what you've described, you've put the delay/message box in the wrong place. Without seeing your code, that's about all I can say.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Refresh of data from external source drop down list from external data source Excel 2007? Intruder Excel 1 08-03-2012 05:41 AM
Refresh of data from external source vba change external data source excelledsoftware Excel Programming 1 07-17-2012 04:22 AM
Refresh of data from external source Automatically Selecting a Data Source Nathan_Newlin Mail Merge 1 12-06-2011 03:42 PM
Edit Data Source- Linking template charts to new data lbf PowerPoint 0 10-28-2011 12:19 PM
Help w/ external data bellest Excel 0 11-11-2005 12:51 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:32 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft