VB 2005 Losing code

Posted on 2007-07-19
Last Modified: 2013-12-26
While working on a vb 2005 project all the controls and code disappeared and the only thing left on the .vb file were my comments. the undue button was disabled.
and I am receiving an error message stating the following
'Name InitializeComponent' is not declared.
Name 'components' is not declared
Is there any way to retrieve the controls and code?
Any help is appreciated

Thank you,
Question by:Kmeli
    LVL 9

    Expert Comment

    You didn't delete your designer file did you?
    LVL 5

    Expert Comment

    If you have saved your form, you won't be able to retreive the controls.

    What I do when it happens is: close the form WITHOUT SAVING, clean my solution and rebuild all...
    If this doesn't help close and reopen Visual Studio.

    Author Comment

    Tried Bart-De-Bal: response.. didn't work.
    Answering traxion: No I don't think I deleted it.
    LVL 9

    Accepted Solution

    This is a known bug from Microsoft:

    There is a hotfix available at the link above.



    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
    If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

    745 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

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now