InvalidOperationException was unhandled

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Aug 2006
Posts: 40
Reputation: Wreef is an unknown quantity at this point 
Solved Threads: 1
Wreef Wreef is offline Offline
Light Poster

InvalidOperationException was unhandled

 
0
  #1
May 21st, 2007
In my VB.NET program i have greated, i am getting the above error with the following description

An error occurred creating the form. See Exception.InnerException for details. The error is: Object variable or With block variable not set.
The debugger doesnt point me towards any actual code to fix, so i am stumped.

How would I go about debugging this error?

Thanks.

(PS, I am learning VB.NET at the moment, the program i am making is an example from a book)
Reply With Quote Quick reply to this message  
Join Date: Dec 2002
Posts: 461
Reputation: waynespangler is on a distinguished road 
Solved Threads: 56
waynespangler waynespangler is offline Offline
Posting Pro in Training

Re: InvalidOperationException was unhandled

 
0
  #2
May 22nd, 2007
Single step thru the load. Most of the time you are referencing something that hasn't been loaded. Such as setting a check box but it hasn't been created yet.
Reply With Quote Quick reply to this message  
Join Date: Aug 2006
Posts: 40
Reputation: Wreef is an unknown quantity at this point 
Solved Threads: 1
Wreef Wreef is offline Offline
Light Poster

Re: InvalidOperationException was unhandled

 
0
  #3
May 22nd, 2007
Originally Posted by waynespangler View Post
Single step thru the load. Most of the time you are referencing something that hasn't been loaded.
How would I do this?

I am still learning, I thought the debugger should tell me where the error is.
Reply With Quote Quick reply to this message  
Join Date: Dec 2002
Posts: 461
Reputation: waynespangler is on a distinguished road 
Solved Threads: 56
waynespangler waynespangler is offline Offline
Posting Pro in Training

Re: InvalidOperationException was unhandled

 
0
  #4
May 22nd, 2007
You would expect the debuger to tell you that but it doesn't. Press the F8 key to single step thru the code. You will run into a line where you will get an error message.
Reply With Quote Quick reply to this message  
Join Date: Aug 2006
Posts: 812
Reputation: arjunsasidharan is on a distinguished road 
Solved Threads: 13
arjunsasidharan's Avatar
arjunsasidharan arjunsasidharan is offline Offline
Practically a Posting Shark

Re: InvalidOperationException was unhandled

 
0
  #5
May 22nd, 2007
or may be you can use BreakPoints to find the Error. On your form_load event on the left of your screen set a breakpoint(refer the book how breakpoint works) and Press F9 or F10 to cycle through your code.
Last edited by arjunsasidharan; May 22nd, 2007 at 9:07 am.
There is just two ways to live your life.
One is as though nothing is a miracle.
The other is as if everything is.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC