Solved

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

Posted on 2009-07-04
6
520 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
[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
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

691 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