Remove <Item> Command (Project Menu)

   

Removes the currently selected item from your project. If you made changes to it since last saving it, you are asked whether you want to save the changes first.

The file remains in all the other projects to which it has been added. Files that have been removed from a project remain stored on your hard disk until you delete them, following the standard procedures of your operating system.

When removing a module or resource file from a project, make sure the remaining code doesn't refer to the removed item.

Note   Use the Components dialog box to remove an ActiveX control from the Toolbox. If you still have an ActiveX control on a form, you can't remove the control from the Toolbox.

Available only at design time.

Note   If you are using an integrated source code control program, such as Microsoft SourceSafe (available with the Enterprise Edition), when you remove a file from your Visual Basic project, a dialog may prompt you to remove the file from the version control project.

With Microsoft SourceSafe, if the .vbp file is checked out, the references to the removed file(s) are automatically deleted. If the .vbp file isn't checked out, when you remove a file, the .vbp file will still contain a reference to the deleted file, causing an error the next time you load your project.