QUOTE(PsychoCoder @ 31 Aug, 2008 - 03:30 AM)

Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.
Please post like this:

Thank you for helping us helping you.
Private Sub Command4_Click()
If Combo1.Text = "Comm 1" Then MSComm1.CommPort = 1
If Combo1.Text = "Comm 2" Then MSComm1.CommPort = 2
If Combo1.Text = "Comm 3" Then MSComm1.CommPort = 3
If Combo1.Text = "Comm 4" Then MSComm1.CommPort = 4
If Combo1.Text = "Comm 5" Then MSComm1.CommPort = 5
If Combo1.Text = "Comm 6" Then MSComm1.CommPort = 6
If Combo1.Text = "Comm 7" Then MSComm1.CommPort = 7
If Combo1.Text = "Comm 8" Then MSComm1.CommPort = 8
If Combo1.Text = "Comm 9" Then MSComm1.CommPort = 9
If Combo1.Text = "Comm 10" Then MSComm1.CommPort = 10
On Error Resume Next
With MSComm1
If .PortOpen = True Then
.PortOpen = False
Else
.PortOpen = True
If Err.Number <> 0 Then
MsgBox "Com" & .CommPort & " is not available." & vbCrLf & _
Err.Description
Err.Clear
End If
End If
End With
MSComm1.CommPort = Combo1.Text
Text3.Text = Combo1.Text
If MSComm1.PortOpen Then
Text2.Text = "Connected"
If Text2.Text = "Connected" Then Command4.Enabled = False
Text2.Text = "Connected"
End If
End Sub
On a new form I use this.
Private Sub Command1_Click()
Dim Response As Integer
For MSComm1.PortOpen = Form1.MSComm1 To MSComm1
Next
If MSComm1.PortOpen = True Then MSComm1.Output = "C"
Unload Me
Exit Sub
End Sub.
The first form works well but the next form does not send data to the comm port.
Thanking you.
Trevor