none
DDEInitiate() Freezing - Excel <-> WinWedge Interface RRS feed

  • Question

  • Hey all,

    I am trying to execute the following VBA code but it freezes at the indicate line:

    Sub OpenChannel()
        Dim Chan As Long
        Chan = DDEInitiate("WinWedge", "COM4") ' freezing here
        DDETerminate Chan
    End Sub

    Basically, I have:

    Barcode scanner (on COM4) ---------> WinWedge (receive scanned data and can executes DDE commands) ------------> Excel (display the barcode in a cell)

    Barcode is online, WinWedge is running and able to receive the scanned barcode, and WinWedge is able to send a command to run a macro in Excel that has the above VBA script. However, the VBA script is freezing at the DDEInitiate line.

    Any idea of the possible cause of the problem?



    Thursday, March 29, 2018 2:15 PM

All replies

  • Hi Grendizer,

    Thanks for visiting our forum. Then here we mainly focus on general issues about Excel user interface. Since your query is more related to using VBA code, I'll move your thread to the following dedicated MSDN forum for Excel for better response:

    https://social.msdn.microsoft.com/Forums/en-US/home?forum=exceldev

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding. 

    Regards,

    Yuki Sun


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Friday, March 30, 2018 2:58 AM
  • Hello Grendizer2018,

    What do you mean freezing ? Did you get any error?

    Besides, since it is related to a third-part products WinWedge, have your checked their support documents for it?

    Best Regards,

    Terry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, March 30, 2018 7:57 AM
  • Thanks Yuki
    Monday, April 9, 2018 1:32 PM
  • Hey Terry,

    There are no errors. Just the whole excel file freezes (not responding) at the DDEInitiate line.

    Also, I tried the same .xlsm file on another computer and it works fine! It doesn't work on my computer... I uninstalled and reinstalled Microsoft Office from scratch but still not good..

    Please let me know if you have any bright ideas against this problem. Thanks!

    Grendizer

    Monday, April 9, 2018 1:36 PM
  • I made another User Account on my computer. I ran the .xlsm file in that account and everything is working! What is possibly corrupted on my current account?
    Monday, April 9, 2018 1:57 PM
  • Hello Grendizer2018,

    I'm glad to hear that your issue has been resolved. I would suggest you mark your solution to close the thread.

    For the issue why your current account could not work, the most possible reason is related to permission. However, since we don't have an environment to reproduce your issue, we would suggest you try to contact with WinWedge support team for help.

    Thanks for understanding.

    Best Regards,

    Terry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, April 10, 2018 8:44 AM