Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Guys I've designed several forms in VB.NET 2013 -SQL Server 2012 and it runs smoothly.
While reopening the saved form, I got an error message as "Object Reference not set to an instance of an object". Unable to solve the error need your guidance.Thanks in advance.

What I have tried:

I can't show my coding since the form is not opening.
Posted
Updated 20-May-17 0:19am

1 solution

VB
Object Reference not set to an instance of an object

The error message means exactly what it says, you are trying to use an object reference that has not been initialised. But the only person who can fix it is you, since you know how your code works, and can run it in the debugger to find the error.
 
Share this answer
 
Comments
nawin.cit 20-May-17 6:25am    
First of all thank you for your comment sir.
I can run the form and it works perfectly, but the point is I can't open form to view its coding sir.
Richard MacCutchan 20-May-17 6:39am    
What do you mean? If you have the source code then you can view it in any editor.
nawin.cit 20-May-17 7:27am    
Sorry Sir I'm new to VB a beginner. Now I can view coding in Notepad. My question is If my coding is wrong it shouldn't compile or it must show an error& warning right?

One more question, after restarting my computer several attempts. I'm now able to view my coding without error. Does it have any other problem?
Richard MacCutchan 20-May-17 8:18am    
In general you are right, but occasionally it will get an error which gives the results you saw. Whether your code has any other problems, it is impossible to guess. One of the main things with development is to test your code as much as possible, in order to try and find any and all errors that may exist in it.
nawin.cit 22-May-17 1:01am    
Thank you Gentlemen.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900