Trouble with WAIT and OLE link updates

Bigzippy

Board Regular
Joined
Jul 1, 2003
Messages
182
Hey-
I have this code that updates links from another program, it takes about 15-18 seconds to update and recalc(?). application.wait does not help. the problem is that the values that are updating show #N/A until they are done updating so my formula copies "#N/A" (BTW i need to copy value only )if it moves to next routine befor update is complete-Please Help I have looked for and tried many ideas, but i must be missing something.

Thanks!

Sub linkupdate2()
Dim alinks As Variant
Dim i As Variant
alinks = ActiveWorkbook.LinkSources(xlOLELinks)
If Not IsEmpty(alinks) Then
For i = 1 To UBound(alinks)
ActiveWorkbook.UpdateLink Name:=alinks(i), Type:=xlLinkTypeOLELinks
Next i
End If
End Sub
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,152,322
Messages
5,769,452
Members
425,548
Latest member
macjagger17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top