Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / December 2007

Tip: Looking for answers? Try searching our database.

Refreshing External Data

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
eggpap - 16 Dec 2007 20:24 GMT
Hello,

the following macro performs only if I set one or more breakpoints in it.
If I run the macro without breakpoints I get one error that says the Data
refresment is impossible owing to the protection of some cells or graphs.
The external data are contained in the sheets A, B and C only.

Sub UpdateAll()
   Sheets("A").Select
   ActiveSheet.Unprotect
   Sheets("B").Select
   ActiveSheet.Unprotect
   Sheets("C").Select
   ActiveSheet.Unprotect
   ActiveWorkbook.RefreshAll
   ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True
   Sheets("B").Select
   ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True
   Sheets("A").Select
   ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True
End Sub

Emiliano
theSquirrel - 17 Dec 2007 02:46 GMT
> Hello,
>
[quoted text clipped - 22 lines]
>
> Emiliano

From the sounds of it, with the breakpoints you are allowing time for
the refresing of the External Data.  With the speed at which your code
runs will be much faster than even the fastest net connection to find,
process and populate the cells you are updating.  You need to find a
way to slow down your code...

theSquirrel
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.