ci sono riuscito....
posto il codice nel caso in cui venga utile a qualcuno![]()
26 è il codice ascii di ctrl + zcodice:Private Sub Form_Load() Dim numero As String Dim txt As String stringa = Command() numero = Left(stringa, 10) txt = Right(stringa, Len(stringa) - 10) MSComm1.CommPort = 1 MSComm1.Settings = "9600,n,8,1" MSComm1.PortOpen = True Call invia(numero, txt) MSComm1.PortOpen = False End End Sub Private Function invia(numero As String, testo As String) MSComm1.Output = "AT+CMGF=1" & Chr$(13) MSComm1.Output = "AT+CMGS=" & Chr$(34) & numero & Chr$(34) & Chr$(13) MSComm1.Output = testo MSComm1.Output = Chr$(26) End Function
13 è il codice ascii di INVIO

Rispondi quotando