Re: [VB6 ] 不好意思有點小問題請教大家

看板Visual_Basic作者 (凱洛)時間15年前 (2010/05/03 19:39), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/2 (看更多)
Dim f As String '檔案名稱 Private Sub btnClear_Click() txtReceive.Text = Empty End Sub Private Sub btnExit_Click() End End Sub Private Sub btnReceive_Click() txtReceive = txtReceive & MSComm1.Input End Sub Private Sub btnSave_Click() CommonDialog1.Filter = "TextFile(*.txt)|*.txt" CommonDialog1.ShowSave '開啟對話視窗 f = CommonDialog1.FileName '取得檔名 txtFileName.Text = f n = FreeFile() '檔案編號 Open f For Append As #n '開啟循序文字檔案 s = txtReceive.Text 'RS232接收的內容 Print #n, s '添入內容 Close #n MsgBox "存檔成功!", vbInformation, "資料存檔" Call ShowData End Sub Private Sub btnSend_Click() MSComm1.Output = txtSend.Text End Sub Private Sub Form_Load() Call SetRS232 '設定RS232 End Sub Private Sub SetRS232() MSComm1.CommPort = 1 MSComm1.Settings = "9600,n,8,1" MSComm1.PortOpen = True End Sub 請問要怎麼改成ACCESS的格式嗎 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 123.240.65.33
文章代碼(AID): #1BthNhWN (Visual_Basic)
文章代碼(AID): #1BthNhWN (Visual_Basic)