Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RS232 Error 8015

Status
Not open for further replies.

sweep123

Technical User
May 1, 2003
185
GB
I was trying to use a downloaded project from the Code Project to try and send/receive data from my old RS232 printer/console.

But I only get the run-time error 8015

Code listed below:-
Dim InputData As String
Private Sub Command1_Click()
Debug.Print DataToTransmitTextBox.Text
MSComm1.Output = DataToTransmitTextBox.Text
End Sub

Private Sub Command2_Click()
End
End Sub

Private Sub Form_Load()
InputData = ""
DataToTransmitTextBox.Text = ""
ReceivedDataTextBox.Text = InputData
MSComm1.PortOpen = True <----- Error at this point
End Sub

Private Sub MSComm1_OnComm()
Select Case MSComm1.CommEvent
Case comEvReceive
ReceivedDataTextBox.Text = MSComm1.Input
Case comEvSend
Timer1.Enabled = True
Case comEvCTS
ReceivedDataTextBox.Text = InputData
InputData = ""
End Select
End Sub

Private Sub Timer1_Timer()
Timer1.Enabled = False
'All data sent, so toggle RTS
MSComm1.RTSEnable = Not MSComm1.RTSEnable
End Sub

I have set both ends up to use the following settings:- 300,n,8,1

Any suggestings?

 
Thanks, did have it set up as a 'Generic Printer' just to test the port. Have now removed it but cant get any data out nor receive any data.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top