Saving and Loading Forms in ASCII Format

See Also2WFHY2E

Visual Basic can save and load both binary format54BG0SJ and ASCII1KYP8NO format forms.  Binary format forms load quickly but you can edit them only in Visual Basic.  ASCII format forms take longer to load but you can edit them with any text editor.  Visual Basic saves forms in binary format by default.  You can load binary files in Visual Basic only if their binary format is recognized by the current or previous version of Visual Basic.

To always save all new forms and modules as ASCII text

   1. From the Options menu, choose Environment.

   2. In the list, select Default Save As Format, and in the Setting combo box, choose Text.


To save an individual form as ASCII text

   1. In the Project window4XEX0P5, select the file you want to save.

   2. From the File menu, choose Save File As.

   3. In the Save File As dialog box, check the Save As Text check box.

   4. Type a new name for the file if necessary and choose OK.


Once you save a form as text, that form is saved in ASCII text format (for example, when you choose Save from the File menu) until you use the Save As command to save it as binary.

To load an ASCII format form

         From the File menu, choose the Add File command and specify the file name.


If an error occurs while loading an ASCII form file, Visual Basic writes an error message to a file with the base name of the form file and the extension .LOG, and displays a message on screen when it has finished loading the file.


Note   Don't confuse saving and loading ASCII format form files with the Save Text and Load Text commands on the File menu.  Use these commands to save and load nonform code modules or to save only the procedures in a form file as text.  If you create separate files using the Save Text command, those files will not be included in the project.



See Also


Environment Command (Options Menu)Z2Y68

Load and Save Text Commands3OB93A

Save File Command7D6QUL

Saving Your Work1MAQDM1


Programmer's Guide:

Appendix A, "ASCII File Format"