From: Luna Moon on
Hi folks,

Could you please help me see how to translate the following VBA/EXXCEL
code into Matlab?

Thanks!

------------------------------------------------

Public Sub DoDDE()

Dim lChannel As Long
lChannel = DDEInitiate("winblp", "bbk")

DDEExecute lChannel, "<BLP-0><CANCEL>"
DDEExecute lChannel, "<BLP-0>SOVR<GO>"
DDEExecute lChannel, "<BLP-0><COPY>"

Excel.Application.Wait Now() + TimeValue("00:00:05")

Sheet1.Cells.Clear
Sheet1.Cells(1, 1).Select
Sheet1.Paste

DDETerminate lChannel

End Sub



Public Sub DoCopy()

Dim sTicker As String
sTicker = "CFTEL1E5 CMAL<CRNCY>"

Dim lChannel As Long
lChannel = DDEInitiate("winblp", "bbk")

DDEExecute lChannel, "<BLP-0><CANCEL>"
DDEExecute lChannel, "<BLP-0>" & sTicker & "HP<GO>"
DDEExecute lChannel, "<BLP-0><COPY>"

Excel.Application.Wait Now() + TimeValue("00:00:05")

Sheet1.Cells.Clear
Sheet1.Cells(1, 1).Select
Sheet1.Paste

DDETerminate lChannel

End Sub

From: Luna Moon on
On Feb 23, 5:56 pm, Luna Moon <lunamoonm...(a)gmail.com> wrote:
> Hi folks,
>
> Could you please help me see how to translate the following VBA/EXXCEL
> code into Matlab?
>
> Thanks!
>
> ------------------------------------------------
>
> Public Sub DoDDE()
>
> Dim lChannel As Long
> lChannel = DDEInitiate("winblp", "bbk")
>
> DDEExecute lChannel, "<BLP-0><CANCEL>"
> DDEExecute lChannel, "<BLP-0>SOVR<GO>"
> DDEExecute lChannel, "<BLP-0><COPY>"
>
> Excel.Application.Wait Now() + TimeValue("00:00:05")
>
> Sheet1.Cells.Clear
> Sheet1.Cells(1, 1).Select
> Sheet1.Paste
>
> DDETerminate lChannel
>
> End Sub
>
> Public Sub DoCopy()
>
> Dim sTicker As String
> sTicker = "CFTEL1E5 CMAL<CRNCY>"
>
> Dim lChannel As Long
> lChannel = DDEInitiate("winblp", "bbk")
>
> DDEExecute lChannel, "<BLP-0><CANCEL>"
> DDEExecute lChannel, "<BLP-0>" & sTicker & "HP<GO>"
> DDEExecute lChannel, "<BLP-0><COPY>"
>
> Excel.Application.Wait Now() + TimeValue("00:00:05")
>
> Sheet1.Cells.Clear
> Sheet1.Cells(1, 1).Select
> Sheet1.Paste
>
> DDETerminate lChannel
>
> End Sub

How to do these DDE stuff from within Matlab?