Visual Basic Concepts

Form Load Error Log Messages

The following error messages can appear in an error log file. Note that these error messages deal only with problems that can occur when Visual Basic loads the form description. They do not indicate any problems that can exist in event procedures, general procedures, or any other part of the Basic code.

Cannot load Menu menuname.

This message appears if Visual Basic finds a menu control whose parent menu is defined as a menu separator. Menu controls that act as parents for menu controls in a submenu cannot be menu separators. Visual Basic does not load the menu control.

This message also appears if Visual Basic finds a menu control whose parent menu has its Checked property set to True. Menu controls that act as parents for menu controls in a submenu cannot be checked. Visual Basic does not load the menu control.

Cannot set Checked property in Menu menuname.

This message appears if Visual Basic finds a top-level menu control with its Checked property set to True. Top-level menus cannot have a checkmark. Visual Basic loads the menu control, but doesn’t set its Checked property.

Cannot set Shortcut property in menuname.

This message appears if Visual Basic finds a top-level menu control with a shortcut key defined. Top-level menus cannot have a shortcut key. Visual Basic loads the menu control, but doesn’t set the Shortcut property.

Class classname in control controlname is not a loaded control class.

This message appears if Visual Basic finds a class name it doesn’t recognize.

Control controlname could not be loaded.

This message appears if Visual Basic encounters an unknown type of control in the form description. Visual Basic creates a picture box to represent the unknown control, giving that picture box any valid properties from the unknown control description. When this message appears, a number of invalid property errors are likely to follow.

Control controlname has a quoted string where the property name should be.

This message appears if Visual Basic finds text inside quotation marks instead of a property name, which you do not place inside quotation marks. For example:

"Caption" = "Start Demo"

In this case, the property name Caption should not have been enclosed in quotation marks. Visual Basic ignores the line in the form description that produced this error.

The control name controlname is invalid.

This message appears if the name of a control is not a valid string in Visual Basic. Visual Basic will not load the control.

Control name too long; truncated to controlname.

This message appears if Visual Basic finds a control name longer than 40 characters. Visual Basic loads the control, truncating the name.

Did not find an index property and control controlname already exists. Cannot create this control.

This message appears if Visual Basic finds a control without an index that has the same name as a previously loaded control. Visual Basic doesn’t load the control.

Form formname could not be loaded.

This message appears if Visual Basic encounters the end of file unexpectedly or if the first Begin statement is missing.

The Form or MDIForm name formname is not valid; cannot load this form.

This message appears if the name of a form is not a valid string in Visual Basic. Visual Basic will not load the form.

Valid strings must start with a letter; can include only letters, numbers and underscores; and must have 40 or fewer characters.

The property name propertyname in control controlname is invalid.

This message appears if the name of a property is not a valid string in Visual Basic or is longer than 30 characters. Visual Basic will not set the property.

Property propertyname in control controlname could not be loaded.

This message appears if Visual Basic encounters an unknown property. Visual Basic skips this property when loading the form.

Property propertyname in control controlname could not be set.

This message appears if Visual Basic cannot set the property of the specified control as indicated by the form description.

Property propertyname in control controlname had an invalid value.

This message appears if Visual Basic encounters an invalid value for a property. Visual Basic changes the property value to the default value for that property.

Property propertyname in control controlname has an invalid file reference.

This message appears if Visual Basic couldn’t use a file name reference. This will happen if the referenced file (probably a binary data file for the form) is not found at the specified directory.

Property propertyname in control controlname has an invalid property index.

This message appears if Visual Basic finds a property name with a property index greater than 255. For example:

Prop300 = 5436

Visual Basic ignores the line in the form description that produced this error.

Property propertyname in control controlname has an invalid value.

This message appears if Visual Basic finds a property with a value that is not correct for that control. For example:

Top = Cahr(22)        ' Really wanted Char(22).

Visual Basic sets the property with its default value.

Property propertyname in control controlname must be a quoted string.

This message appears if Visual Basic finds a property value without quotation marks that should appear inside quotation marks. For example:

Caption = Start Demo

Visual Basic ignores the line in the form description that produced this error.

Syntax error: property propertyname in control controlname is missing an '='.

This message appears if Visual Basic finds a property name and value without an equal sign between them. For example:

Text        "Start Demo"

Visual Basic doesn’t load the property.

For More Information   Additional information on errors encountered during form load is available by clicking the Help button in the error dialog box or by pressing F1.