DDEInitiate()冻结 - Excel< - > WinWedge界面 [英] DDEInitiate() Freezing - Excel <-> WinWedge Interface

查看:146
本文介绍了DDEInitiate()冻结 - Excel< - > WinWedge界面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿所有,


我正在尝试执行以下VBA代码,但它在指示行冻结:


Sub OpenChannel()

    Dim Chan As Long

    Chan = DDEInitiate("WinWedge","COM4")'冻结此处为
    DDETerminate Chan

End Sub


基本上,我有:


条码扫描器(在COM4上)----- ----> WinWedge(接收扫描数据并可以执行DDE命令)------------> Excel(在单元格中显示条形码)


条形码在线,WinWedge正在运行并能够接收扫描的条形码,WinWedge能够发送命令在Excel中运行宏有上面的VBA脚本。但是,VBA脚本在DDEInitiate行冻结。


是否有可能导致问题的原因?

解决方案

嗨Grendizer,


感谢您访问我们的论坛。那么我们主要关注Excel用户界面的一般问题。由于您的查询与使用VBA代码更相关,因此我将您的主题移至以下专用的MSDN论坛以获得更好的响应:


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


我们建议适当发布的原因是您将获得最合格的受访者群体,而定期阅读论坛的其他合作伙伴可以分享他们的知识或从您与我们的互动中学习。感谢您的理解。 


问候,


Yuki Sun


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?

解决方案

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


这篇关于DDEInitiate()冻结 - Excel< - > WinWedge界面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆