From: Luna Moon on 23 Feb 2010 17:56 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 24 Feb 2010 08:40 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?
|
Pages: 1 Prev: Comparing Arrays of different size Next: How to draw arcs and lines on a worldmap? |