LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default pause/re-run macro to enable DDE updating

hello, please check the macro i've writen:

Sub Macro1()

Dim i As Integer

For i = 1 To 100000
If Worksheets("sheet1").Range("PXLAST").Value =
Worksheets("sheet1").Range("init").Offset(i, 0).Value Then
Else
Worksheets("sheet1").Range("PXLAST").Copy
Worksheets("sheet1").Range("init").Offset(i, 0).PasteSpecial
Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End If
Next

End Sub

*on the PXLAST cell i have a formula that gets updated via a DDE link:
=blp("ukx index", "last price")
*this returns the real time price of FTSE100
my macro is supposed to copy this value down 100000 times or so whenever
there is a change from prev value.
*however i can't get the PXLAST cell to get updated while the macro is
running, so i wanted to introduce a pause in the programming that would allow
the DDE to update before having the macro running again.
*my code is also no working properly because the macro will execute the ELSE
even if the IF clause is verified. as at now, my macro is copying down 6527.6
all the time.

can you help me out with code suggestions?

much appreciated.
 
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
pause macro Art Parra Excel Programming 1 August 29th 06 12:16 AM
Pause Macro 2 Ollie Excel Discussion (Misc queries) 3 June 15th 06 04:49 AM
Pause Macro cottage6 Excel Programming 2 April 14th 06 04:23 PM
Pause a macro? JohnnyJomp Excel Programming 4 March 10th 05 10:17 PM
Pause macro Bill Barclift Excel Programming 0 September 30th 03 09:22 PM


All times are GMT +1. The time now is 03:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"