會員 ![]() | COM Port 被佔去 我因為太懶骨頭,連「電話銀行」都用Excel 代打,目前用下列程式。 但一踫到「WinFax]之類的COM Port 就被佔去… 請 各位大大 Help !! Public Sub Dial(Number$) ' MSComm1 need -> 工具-設定引用項目-Microsoft Comm Control 6.0 (MSCOMM32.OCX) ' 並且打開 音量控制-音源 Set Comm = 轉帳作業.MSComm1 Dim FromModem$, dummy ' Communications port settings. ' Assuming that a modem is attached to COM2, CommPort is set to 2 If Not OnLine Then Comm.CommPort = 2 Comm.Settings = "9600,N,8,1" ' Open the communications port. On Error Resume Next Comm.PortOpen = True If Err Then MsgBox "COM2: 無法使用. 請將 CommPort 屬性改變成其他通訊埠。" Exit Sub End If OnLine = True End If ' Flush the input buffer. Comm.InBufferCount = 0 ' Dial the number. Comm.Output = Number$ & vbCr ' Wait for "OK" to come back from the modem. Do dummy = DoEvents() ' If there is data in the buffer, then read it. If Comm.InBufferCount Then FromModem$ = FromModem$ + Comm.Input ' Check for "OK" If InStr(FromModem$, "OK") Then Exit Do End If ' Did the user choose Cancel? If CancelFlag Then ' Close the port. Comm.PortOpen = False OnLine = False CancelFlag = False Exit Do End If Loop End Sub |
回覆 |
會員 ![]() | Re: COM Port 被佔去 簡單的說,就是跟「WinFax]之類的在搶 COM Port 啦 !! |
回覆 |
|
![]() | ||||
主題 | 主題作者 | 討論版 | 回覆 | 最後發表 |
Port VLAN Switch(8 port)的選擇 | darksnow | -- 網 路 硬 體 版 | 7 | 2010-11-05 08:25 AM |
【下載】Microsoft Port Reporter & Port Reporter Parser | FYI | -- 軟 體 分 享 版 | 1 | 2007-02-08 10:39 PM |
【求助】改ezPeer Port ~~ ???? | norssken | -- 網 路 技 術 版 | 0 | 2004-06-02 05:10 PM |
有沒有人願意幫忙換主機板LPT PORT?? | kayguay | -- 電 腦 硬 體 討 論 版 | 4 | 2004-04-25 12:16 PM |
【求助】關於A7V8X的USB 6 PORT | sendou123 | -- 電 腦 硬 體 討 論 版 | 4 | 2003-02-16 04:09 AM |
XML | RSS 2.0 | RSS |
本論壇所有文章僅代表留言者個人意見,並不代表本站之立場,討論區以「即時留言」方式運作,故無法完全監察所有即時留言,若您發現文章可能有異議,請 email :[email protected] 處理。