精选优质文档-倾情为你奉上一用VB DDE通讯!二1.启动excel从:工具-宏-Visual Basic 编辑器,打开excel VBA.2.在ThisWorkbook上右单击鼠标选择插入-用户窗体3.单击一下插入的窗体,单击菜单上的-工具-附加控件-选择Microsoft Communications Control, version 6.04.在窗体上添加mscomm1,添加commandButton15.单串口机子,短接rs232的2脚和3脚,双串口机子用232线连接两个串口,注意2、3线交叉,我这里以单串口短接举例。6.复制以下代码到你的窗体里:VB codeVBA代码Private Sub CommandButton1_Click() MSComm1.Output = BEG1ENDEnd SubPrivate Sub MSComm1_OnComm()Dim t1 As Long, com_String As StringStatic i As Integer