Solved

MSComm array?? MSComm.CommEvent

Posted on 2004-08-02
1
816 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

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…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

738 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