Microsoft KB Archive/194753

= BUG: Divide Error When Compiling Project From Command Line =

Article ID: 194753

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 Q194753



SYMPTOMS
Compiling a Visual Basic project from the command line results in the following error:

"VB6 caused a divide error in module VB6.EXE at 0137:00482a61"

NOTE: The actual memory address may be different for your project.



CAUSE
This problem is caused by custom "tabs" added to the Visual Basic 6.0 IDE's Toolbox that contain controls.



RESOLUTION
Remove the custom "tabs" from Visual Basic IDE's Toolbox.

Step-by-Step Example

 * 1) Open a project in Microsoft Visual Basic.
 * 2) Secondary-mouse click on the custom tab in the Visual Basic Toolbox. If the Toolbox is not visible, select it from the View menu. Select "delete tab" from the shortcut menu.
 * 3) Repeat this process for each tab on the Toolbox.



STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.



Steps to Reproduce Behavior
 Create a Standard EXE project in Visual Basic. Form1 is created by default. Right-click on the Toolbox, and select "Add Tab." When the "New Tab Name" dialog appears, name the tab "Test." The new tab will appear at the bottom of the Toolbox. Select a control in the Toolbox, and drag it on top of the "Test" tab. This action will place the control onto the tab. Press the ALT+F4 key combination to close Visual Basic.</li> Open an MS-DOS Command Prompt and execute the following command:

SET PATH="C:\Program Files\Microsoft Visual Studio\VB98"

Modify the above path as appropriate.</li> From the command line, attempt to compile a Microsoft Visual Basic project. An example of compiling a project from the command line is:

VB6.EXE /Make C:\Source\Project1.VBP

The following error message will appear:

"This program has performed an illegal operation and will be shut down"

Select "Details" from the error dialog box. The following details will be reported:

"VB6 caused a divide error in module VB6.EXE at 0137:00482a61".

NOTE: The actual memory address may be different for each project.</li></ol>

Additional query words: kbDSupport

Keywords: kbbug kbide kbcommandline kbcompiler KB194753

-

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

© Microsoft Corporation. All rights reserved.