Posted 1 Jul 2008 Hi, I use DDEInitiate & DDERequest to obtain data from OMRON CJ1M PLC. DDE Manager Version 3.1.1.1 This is the code in Excel VBA: ChannelNumber = Application.DDEInitiate(app:="CDMDDE", topic:="C:\OMRON\Test.cdm") ReturnArray = Application.DDERequest(ChannelNumber, "SS001_TagImage1-1") Application.Worksheets("Sheet1").Range("A1") = ReturnArray Point D4000_001 added in Test.cdm with 64 elements. I want to read 127 words starting from D4000. First, I get the data in array - this what I expect. After a few try, the data is in string. Do you guys know what's going wrong here? Thanks. Share this post Link to post Share on other sites
Posted 1 Jul 2008 Not 100% sure with Omron DDE my experience is with AB Product and Excel VB but do you have an Option Explicit declaration at the top of your module? Option Explicit forces VB to fault if a variable is not explicitly defined. Adding this and then defining ReturnArray as an array Integer should help I think. Also if ReturnArray is an array of 64 integers how is it supposed to fit in a range of 1 cell? Share this post Link to post Share on other sites
Posted 3 Jul 2008 After surfing few days, finally understand that it's mostly due to the excel DDE functions itself that expect to receive tab delimited. http://www.taltech.com/support/dde_sw/ddeexcel505.htm Share this post Link to post Share on other sites