?
Solved

Is it possible to stop temporarily a event?

Posted on 2002-03-28
2
Medium Priority
?
214 Views
Last Modified: 2010-05-02

.  I would like stopping a event when I fill a another control box (combo box, list box....) because VB makes a event when my combo is modified. Each time, VB launches the codes which is to link to event.


Is it possible ?
0
Comment
Question by:zoltix
[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
2 Comments
 
LVL 38

Expert Comment

by:PaulHews
ID: 6903677
You cannot stop the event.  You can however trap certain instances of the event.

Option Explicit
Private mbSel As Boolean

Private Sub Form_Load()
    Dim i As Integer

    For i = 1 To 3
        List1.AddItem "item " & i
    Next i
   
'    by setting this flag we ingnore click event from selecting item
    mbSel = True
    List1.ListIndex = 0
    mbSel = False
    'after selecting we can now capture the clicks generated by the mouse
   
End Sub

Private Sub List1_Click()
    'if the variable is true, then we want to ignore event.
    If mbSel Then Exit Sub
   
    Debug.Print "click " & List1.List(List1.ListIndex)
End Sub
0
 
LVL 1

Accepted Solution

by:
daniellyh earned 100 total points
ID: 6904462
yes i think this should be the way to skip the event in certain conditions.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying 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

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…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses
Course of the Month15 days, 17 hours left to enroll

741 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