Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Update links to other workbooks while running macro

Hi, this must be easy, but I´ve searched and can not find the
solution:

I have an Excel spreadsheet with realtime stock prices (spreadsheet A).
I have written a little tool in a separate file (spreadsheet B) that
links to the realtime prices and performs some checks on them.
However, while the macro is running through its user-specified amount
of loops, the data is frozen. How can I avoid this? Can I tell Excel to
keep updating the link from sheet B to sheet A, or how can I include an
update routine into the macro loop?

Thanks a lot
Kai

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Update links to other workbooks while running macro


1. You could try adding the lines
Calculate
DoEvents
in various places.

2. Perhaps open another instance of Excel

--
Brian

-----------------------------------------------------------------------
BrianB's Profile: http://www.excelforum.com/member.php...tinfo&userid=5
View this thread: http://www.excelforum.com/showthread.php?threadid=38806

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Update links to other workbooks while running macro

Thanks Brian, I´ll try that.

Kai

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Update links to other workbooks while running macro

Hi again, unfortunately DoEvents and Calculate do not solve the
problem, the external links still stay frozen while the macro is
running.

Any other ideas?
Thanks
Kai

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 129
Default Update links to other workbooks while running macro

Hi,

i have not tested but
how about updating the links by using 'UpdateLink' method at proper time
in the loop?

UpdateLink
http://msdn.microsoft.com/library/en...HV05205722.asp

--
HTH
okaizawa

wrote:
Hi again, unfortunately DoEvents and Calculate do not solve the
problem, the external links still stay frozen while the macro is
running.

Any other ideas?
Thanks
Kai



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Update links to other workbooks while running macro

Thanks okaizawa. For some reason this did not work either, at least not
when the source of the realtime data and the DDE spreadsheet were open
at the same time.
I got a message saying "update method failed" ..
Luckily I could solve the problem in a different way. The macro in
question was supposed to alert the user with sound when a certain
condition occurred, I found a way to do it without a macro altogether,
see:
http://www.j-walk.com/ss/excel/tips/tip59.htm
works like a charm.

Thanks to all,
Kai

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
Macro to open, Update links, save and close workbooks Anton Excel Discussion (Misc queries) 0 January 7th 10 03:18 AM
update links to password protected workbooks. pjbur2005 via OfficeKB.com Excel Discussion (Misc queries) 1 May 5th 09 12:35 PM
Links auto update on some workbooks but not others Tasza Excel Worksheet Functions 1 October 25th 05 01:04 AM
Can you update links between workbooks without them both open? Nicolle K. Excel Discussion (Misc queries) 1 January 7th 05 07:39 PM
Don't Update Links to Ext Workbooks using VBA SuperJas Excel Programming 1 January 31st 04 03:39 AM


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