Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 27th, 2003, 11:31 AM
pjhurley pjhurley is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Western New York, USA
Posts: 1 pjhurley User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Excel: Disabling Automatic Calculation from a remote workbook

Situation:
Workbook_A contains several macros that access an Oracle database.

I created a worksheet in Workbook_A that uses those macros. The worksheet has about 500 references to the Macros.

When I reopen Workbook_A, it opens fine and does not re-execute the macros.



The Problem:
I saved Workbook_A as an 'ADD-IN' (Workbook_A.xla).
I created a worksheet in a new Workbook_B (using Workbook_A as the add-in) using the same 500 references to the macos as described above.

When I reopen Workbook_B, it opens and immediately re-executes each of the 500 macros. Because of this recalculation, the open process takes several minutes.


Question:
Does anyone know how to set up the Workbook_B to not automatically re-execute the macros?

I have tried the following in thisworkbook object in both Workbook_A and Workbook_b without achieving the desired results.

Private Sub Workbook_Open()

'Turn off UpdateRemoteReferences to disable the entire recalculation of the workbook at open
ActiveWorkbook.UpdateRemoteReferences = False

End Sub



The reason I am pursuing this add-in approach is that these macros are used in 100 different spreadsheets and rather than maintain 100 spreadsheets I want to be able to maintain all of those macros in one place.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > Excel: Disabling Automatic Calculation from a remote workbook


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway