Having trouble with a dderequest. I'm using the following code to call data from an external app thru DDE into Excel with VBA. It works fine for the first request. Then the second request returns a lbound of 1 and a ubound of 17, but when I try to msgbox the results, I get "subscript out of range". Any ideas?
Code:lchannel = DDEInitiate("GoldMine", "Data") sRet = DDERequest(lchannel, "&username") sUsername = sRet(1) sRet = DDERequest(lchannel, "&sysinfo") For x = LBound(sRet) To UBound(sRet) MsgBox sRet(x) Next x DDETerminate (lchannel)




Reply With Quote