Solved

Handles clause requires a WithEvents variable defined in the containing type or one of its base types.

Posted on 2009-07-04
6
508 Views
Last Modified: 2013-11-08
Getting an error "Handles clause requires a WithEvents variable defined in the containing type or one of its base types." in vb application for a spell checker.
error2.bmp
0
Comment
Question by:kor786
  • 3
  • 3
6 Comments
 
LVL 47

Accepted Solution

by:
Wayne Taylor (webtubbs) earned 500 total points
ID: 24776417
How have you declared "SpellCheck"? It should be declared at class level (ie, outside of any routines) as described in the error....

    Private WithEvents SpellChecker As NetSpell.SpellChecker.Spelling

Wayne
0
 

Author Comment

by:kor786
ID: 24776447
yes i have
Friend SpellChecker As NetSpell.SpellChecker.Spelling
0
 
LVL 47

Expert Comment

by:Wayne Taylor (webtubbs)
ID: 24776449
It should be declared "WithEvents", as I mentioned in my post above.
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 

Author Comment

by:kor786
ID: 24776451
if i put
    Private WithEvents SpellChecker As NetSpell.SpellChecker.Spelling
i get
'SpellChecker' is already declared as 'Friend SpellChecker As NetSpell.SpellChecker.Spelling' in this class.'
0
 
LVL 47

Expert Comment

by:Wayne Taylor (webtubbs)
ID: 24776452
Simply add "WithEvents" to the already existing declaration!!
0
 

Author Comment

by:kor786
ID: 24776454
Thanks, That worked!
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

707 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

12 Experts available now in Live!

Get 1:1 Help Now