Serving the Quantitative Finance Community

 
User avatar
malves
Topic Author
Posts: 0
Joined: June 28th, 2007, 7:02 am

pause macro to enable DDE updates

June 28th, 2007, 9:28 am

hi guys,i wrote a macro that wont get updated unless i can find a way to enable DDE updates while the macro is runnins. or maybe stop/sleep the macro and having it rerunning.this is an example.Sub Macro1()Dim i As IntegerFor i = 1 To 1000Do While Worksheets("sheet1").Range("pxlast").Value = Worksheets("sheet1").Range("init").Offset(i - 1, 0).Value ' this is where i need to induce sleeping or pausing or stopingLoopWorksheets("sheet1").Range("pxlast").CopyWorksheets("sheet1").Range("init").Offset(i, 0).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=FalseNextEnd SubPXLAST is =blp("ukx index", "last price")thanks indeed in advance.
 
User avatar
malves
Topic Author
Posts: 0
Joined: June 28th, 2007, 7:02 am

pause macro to enable DDE updates

June 29th, 2007, 8:25 am

i got it. thanks.there a fine example of a very good way this can be accomplished at www.xl-logic.com
 
User avatar
bskilton81
Posts: 0
Joined: December 16th, 2004, 8:30 pm

pause macro to enable DDE updates

July 9th, 2007, 4:12 pm

What was the solution?