Solved

MSComm array?? MSComm.CommEvent

Posted on 2004-08-02
1
780 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
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

763 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now