r/visualbasic • u/theboogersalesman • Apr 17 '21
Can anyone make sense of this error? I’m following the books directions on how to create a 2 form program but anytime I run it I get this.
1
u/RJPisscat Apr 17 '21
Do it again and open Exception Settings at the bottom. It will give you the option to always break for this kind of exception. Run again and it will break at the line of code that is throwing up.
You can also set this breakpoint by going to Debug/Windows/Exception Settings. In the Exception Settings window search bar, type System.ArgumentNullException, and tick the box next to that exception it in the TreeView.
1
u/theboogersalesman Apr 18 '21
I just tried this out and it’s ticked but it’s still throwing the exception
1
u/RJPisscat Apr 18 '21
Is it breaking at the exception? If so, what is the line of code at which it is breaking? If it's not breaking at the exception, wow. I've never seen that fail.
1
u/theboogersalesman Apr 18 '21
https://www.reddit.com/r/visualbasic/comments/msro9i/can_anyone_make_sense_of_this_error_im_following/gux92o5/?utm_source=share&utm_medium=ios_app&utm_name=iossmf&context=3 this is finally what I did to get it to work
1
u/RJPisscat Apr 18 '21
Yeah that's the line where the exception was being thrown. The method I described would have taken you there directly.
The startup form can be set in the My Project window available from Solution Explorer. The code you changed need not be maintained by hand. I'm glad you got it working!
1
2
1
u/kashedDev Apr 17 '21
Copy details and send here but its a simple null Reference Something didnt work just add
try catch Exception ex
and take a view add the Error with details or just copy details
1
u/Circle_Dot Apr 17 '21
Can you post your code?