Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Refreshing External Data

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Refreshing External Data

On Dec 16, 12:24 pm, "eggpap" wrote:
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


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
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
Refreshing external data JohnUK Excel Programming 2 October 12th 07 12:56 PM
External data refreshing to include new rows Ross Jenkins Excel Programming 0 October 11th 07 01:08 PM
Refreshing External Data Ranges PJFry Excel Programming 4 September 24th 07 11:44 PM
Refreshing external data JohnUK Excel Programming 5 September 13th 07 12:52 PM
Query to external data not refreshing R Ormerod Excel Discussion (Misc queries) 1 April 1st 05 08:39 PM


All times are GMT +1. The time now is 02:55 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"