6/13/2023 0 Comments Excel vba serial port mscommlibMSComm1.PortOpen = True ' Test to see if this port is a modem MSComm1.Output = 'AT&N6' + Chr$(13) 'Enable our timer so we don't get caught in the loop Timer1.Enabled = True 'Reset the Timeout flag bTimeout = False Do If bTimeout Then 'No characters received Exit Do End If DoEvents Loop Until MSComm1.InBufferCount >= 2 ' Disable the timer Timer1.Enabled = False ' Read the 'OK' or 'AT' response data in the serial port. MSComm1.Settings = '9600,n,8,1' ' Tell the control to read entire buffer when Input is used. Here is a sample I use to test comm 1 thru 4 to see if it is available for use as a serial port (no modem) Function TestComm(Port As Integer) As Boolean Dim szInput As String ' Only test COM1 thru COM4 If Port 4 Then TestComm = False Exit Function End If On Error GoTo TESTFAIL ' Set the com port number MSComm1.CommPort = Port ' 9600 baud, no parity, 8 data, and 1 stop bit. Let the Force be your guide and head on over to the today to download your favorites! And speaking of fun, additional voices can also be found at. (Continue reading below for video samples of Yoda and Darth Vader.) If you're going to be away from your friends and family on travel and want familiar voices to keep you company, it's as simple as using to record them speaking the commands and directions (and they can even have some fun with the phrases).
0 Comments
Leave a Reply. |