Microsoft KB Archive/214427

= FIX: "Prompt To Save Changes" Setting Crashes VB IDE Upon Saving Project Files =

Article ID: 214427

Article Last Modified on 5/13/2003

-

APPLIES TO


 * Microsoft Visual Basic 6.0 Learning Edition
 * Microsoft Visual Basic 6.0 Professional Edition
 * Microsoft Visual Basic 6.0 Enterprise Edition

-



This article was previously published under Q214427



SYMPTOMS
When you enable the "Prompt to Save Changes" setting in a Visual Basic IDE and open a project and site a TextBox with its DataFormat property set to a value other than default, the Visual Basic IDE crashes upon saving the project files when the application is started from the Sub Main of a module.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

This bug was corrected in Visual Studio 6.0 Service Pack 3.

For more information about Visual Studio service packs, please see the following articles in the Microsoft Knowledge Base:

194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why

194295 HOWTO: Tell That Visual Studio 6.0 Service Packs Are Installed



Steps to Reproduce Behavior
 Create a new Standard EXE project in Visual Basic. Form1 is created by default. Place a TextBox on Form1. Set Text1's DataFormat property to anything other than the default (Number, for instance), and then click Apply.  From the Project menu, add a Standard module to the project and paste the following code into Module1: Public Sub Main Form1.Show End Sub  On the Tools menu, click Options. Select the Environment tab and make sure that Prompt to Save Changes is selected. On the Project menu, click Project1 Properties. Set the Startup object as Sub Main. Press the F5 key to run the project. Visual Basic will prompt you to save the files (frm, bas, and vbp). Accept the defaults and click OK. Once the save is completed, Visual Basic will crash with an error message and the IDE is shut down. The exact error message may differ, but should be similar to the following:</li></ol>

VB6.EXE - Application Error

The Instruction at "0x001a09b2" referenced memory at "0x00000000". The memory could not be "read"

Keywords: kbbug kbfix kbideproject kbvs600sp3fix KB214427

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.