DDE LINKS AUTOMATIC UPDATE

123456

New Member
Joined
Dec 9, 2005
Messages
5
Can anyone advise me how to write a code that allows dde links to update before moving into the next step.
For example

I would like to open the file....wait for the dde links to update and once the values have updated , copy and paste the values over to a new sheet as values only....I have tried the wait method but the links doesn't update while it is waiting
 

Some videos you may like

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

HalfAce

MrExcel MVP
Joined
Apr 6, 2003
Messages
9,453
Hello 123456, welcome to the board.
Instead of the Application.Wait method you can try putting all the code you want to execute after the DDE links finish updating into a seperate sub and using the Application.OnTime method.
(ie.)
Code:
Private Sub Workbook_Open()
Application.OnTime Now + TimeSerial(0, 0, 2), "YourMacroNameHere"
End Sub

This will allow 2 seconds (or make it as long as you like) for them to update/calculate before continuing, whereas the App.Wait does not.

Hope it helps.
 

Watch MrExcel Video

Forum statistics

Threads
1,118,291
Messages
5,571,331
Members
412,382
Latest member
Langtn02
Top