Solved

MSComm array?? MSComm.CommEvent

Posted on 2004-08-02
1
807 Views
Last Modified: 2013-12-25
have MSComm array MSComm3(0),MSComm3(1),MSComm3(2).. but i can't get this code to work,,

Compile error:

Procedure declaration does not match description of event or procedure having the same name.

how do i solve this problem. thx..  


Code:

Public Sub MSComm3_OnComm()

    If frmMain.MSComm3.CommEvent <> 2 Then
        Exit Sub
    End If
     

    Select Case MSComm3(0).CommEvent
        Case comEvReceive
                    .........
    End Select
     

    Select Case MSComm3(1).CommEvent
        Case comEvReceive
    ................
    End Select
     

    Select Case MSComm3(2).CommEvent
        Case comEvReceive
    ......................
     End Select


End sub

can i use an array with this control. or must i have a MSComm1_OnComm, MSComm2_OnComm and so on...

thx :)
0
Comment
Question by:NissePPP
1 Comment
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 50 total points
ID: 11692089
You seem to have lost the index paramenter form the event.

It should look like this

Private Sub MSComm1_OnComm(Index As Integer)

End Sub

0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question