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)

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.

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.

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.

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.