Option Explicit Dim con As New ADODB.Connection Dim rs As New ADODB.Recordset Private Sub configure_Click() Form2.Show End Sub 'Sub rs232() 'Dim temp_varc, serialen, keyvolume 'if (temp_varc=0x38) then 'serialen = 1 'upload 'serialen = 0 'keyvolume (5000) 'End If 'End Sub Private Sub upload_Click() Dim ff, i As Integer Dim temp_varc, serialen, keyvolume Dim address, buf, strtbyte As String 'buf = Space(50) If MSComm1.PortOpen = True Then With CommonDialog1 .InitDir = App.Path .FileName = "" .Filter = "Hex File (*.hex)|*.hex" .ShowSave ff = FreeFile Open .FileName For Output Lock Read As #ff 'Form1.Label3.Caption = "Entering While Loop and Waiting For Command" address = 8000 Print #ff, ("1 ") 'gets(buf, Space(50)) While (address < 8090) Print #ff, ("2 :10" & address & "00") 'sendblock (address) address = address + Hex$(16) Wend address = 8000 While (address < 8090) Print #ff, ("3 :10" & address & "00") 'sendblock (address) address = address + Hex$(16) Wend Print #ff, ("3 :00000001FF") Print #ff, ("4 ") Close #ff End With End If End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)