See Also
Trappable errors can occur while an application is running, either within the Visual Basic environment or as a stand-alone executable. Some of these can also occur during design time or compile time. You can test and respond to trappable errors using the On Error statement and the Err function.
Remember, while developing in Visual Basic you can get help on any message by pressing F1.
Code Message
3 Return without GoSub
5 Illegal function call
6 Overflow
7 Out of memory
9 Subscript out of range
10 Duplicate definition
11 Division by zero
13 Type mismatch
14 Out of string space
16 String formula too complex
17 Can't continue
19 No Resume
20 Resume without error
28 Out of stack space
35 Sub or Function not defined
48 Error in loading DLL
49 Bad DLL calling convention
51 Internal error
52 Bad file name or number
53 File not found
54 Bad file mode
55 File already open
57 Device I/O error
58 File already exists
59 Bad record length
61 Disk full
62 Input past end of file
63 Bad record number
64 Bad file name
67 Too many files
68 Device unavailable
70 Permission denied
71 Disk not ready
74 Can't rename with different drive
75 Path/File access error
76 Path not found
91 Object variable not set
92 FOR loop not initialized
93 Invalid pattern string
94 Invalid use of Null
95 Cannot destroy active form instance
281 No More DDE channels
282 No foreign application responded to a DDE initiate
283 Multiple applications responded to a DDE initiate
284 DDE channel locked
285 Foreign application won't perform DDE method or operation
286 Timeout occured while waiting for DDE response
287 User pressed ESC key during DDE operation
288 Destination is busy
289 Data not provided in DDE operation
290 Data in wrong format
291 Foreign application quit
292 DDE conversation closed or changed
293 DDE method invoked with no channel open
294 Invalid DDE Link format
295 Message queue filled; DDE message lost
298 DDE requires DDEML.DLL
320 Can't use character device names in filenames: 'item'
321 Invalid file format
341 Invalid object array index
342 Not enough room to allocate control array 'item'
343 Object not an array
344 Must specify index for object array
360 Object already loaded
361 Can't load or unload this object
362 Can't unload controls created at design time
363 Custom control 'item' not found
364 Object was unloaded
365 Unable to unload within this context
380 Invalid property value
382 'item' property cannot be set at run time
383 'item' property is read-only
384 'item' property can't be modified when form is minimized or maximized
385 Must specify index when using property array
386 'item' property not available at run time
387 'item' property can't be set on this control
388 Can't set Visible property from a parent menu
391 Name not available.
392 MDI Child forms cannot be hidden
393 'item' property cannot be read at runtime
394 'item' property is write-only
400 Form already displayed; can't show modally
401 Can't show non-modal form when a modal form is displayed
402 Must close or hide topmost modal form first
403 MDI forms cannot be shown modally
404 MDI child forms cannot be shown modally.
420 Invalid object reference
421 Method not applicable for this object
422 Property 'item' not found
424 Object required
425 Invalid object use
426 Only one MDI form allowed
460 Invalid clipboard format
461 Specified format does not match format of data
480 Can't create AutoRedraw image
481 Invalid picture
482 Printer error
708 File not found: |
710 File already open: |
712 Device IO error: |
713 File already exists: |
716 Disk full: |
719 Bad file name: |
722 Too many files: |
725 Permission denied: |
730 Path access error: |
731 Path not found: |
732 Must have startup form or Sub Main()
735 Can't save file to TEMP
740 Invalid procedure name
742 Not enough room to paste contents into current line
743 Unable to set next statement
744 Search text not found
745 Text would be too long. Edit prevented
746 One or more replacements too long and not made
747 Syntax errors produced while replacing
748 An undo error has occurred. Further undo is unavailable
749 Watch expression too long. Expression truncated.
750 An expression must be selected
752 Error reading Tutorial file 'item'
753 Tutorial directory 'item' not found
754 Can't find Tutorial file 'item'
755 Not enough memory to load Tutorial
756 Duplicate procedure name
757 Can't find Windows Help .EXE file
758 Control must be same type as rest of array
759 Array already has a control at index 'item'
760 Not a legal object name: 'item'
761 Must specify which item(s) to print
762 Can't clear INDEX property without changing NAME
764 | is a control name
765 Controls without the align property cannot be placed directly on the MDI form
766 Event handler must be a Sub procedure
768 Event procedure argument has incorrect data type
769 Menu subitem skipped a level
770 Can't put check mark here
771 Can't assign shortcut key to menu name
772 Can't use separator bar as menu name
773 Menu control must have a name
774 Menu control array element must have an index
775 Menu control array indices must be in ascending order
776 Menu control array elements must be contiguous and within the same
777 Shortcut key already assigned
778 Separator may not be checked or disabled, or have an shortcut key
779 At least one submenu item must be visible
780 Valid Range: [1..32]
781 Valid Range:[24..1188]
783 Separator may not be the Window List menu
784 Can't have more than one Window List menu
785 New not allowed on this type
20000 Can't load Custom Control DLL: 'item'
20001 Can't unload Custom Control DLL; in use
20002 Can't quit at this time
20003 You'll have to restart your program after this edit--proceed anyway?
20004 'item' has been changed; must reset
20005 Reset halted programs so Code window can be closed?
20006 Not enough stack space to enter break mode--continue?
20007 Not enough stack space to enter break mode for error--must reset
20008 Line too long to edit--edit truncated line?
20009 Search complete
20011 Invalid command-line argument 'item'
20012 Save changes to 'item'?
20013 You already have a control named 'item'. Do you want to create a control array?
20014 Error loading 'item'. The code associated with this form could not be loaded. Continue loading form?
20015 Error loading 'item'. An error was encountered loading a property. Continue?
20016 Error loading 'item'. A control could not be loaded due to load error. Continue?
20017 Form had old file format
20018 Replace existing 'item'?
20019 'item' does not exist
20020 'item' already exists in project
20021 '|' is a Read-Only file
20022 Errors during load. Refer to '|' for details
20023 '|' could not be loaded
20024 Version number missing or invalid; Visual Basic 2.0 assumed.
20025 String value to long to process; form load aborted
20048 Line |1: The file |2 could not be loaded.
Grid Messages
30000 Can not do a RemoveItem on a fixed row
30001 Can not do an AddItem in a fixed row
30002 Grid does not contain that row
30004 Invalid Column number for alignment
30005 Invalid Alignment value
30006 Unable to Allocate Memory For Grid
30008 Not a valid Picture type
30009 Invalid Row Value
30010 Invalid Column Value
30011 Unable to register the memory manager
30013 Invalid Row Height Value
30014 Invalid Column Width Value
30015 Can not remove last non-fixed row
30016 FixedRows must be one less than Rows value
30017 FixedColumns must be one less than columns value
OLE Messages
31001 Out of memory
31003 Can't open Clipboard
31004 No object
31006 Unable to close object
31007 Can't paste
31008 Invalid property value
31009 Can't copy
31017 Invalid format
31018 Class is not set
31019 Source Document is not set
31021 Invalid Action
31022 Unable to initialize OLE
31023 Invalid or unknown Class
31024 Unable to create link
31026 Source name is too long
31027 Unable to activate object
31028 Object not running
31029 Dialog already in use
31031 Invalid source for link
31032 Unable to create embedded object
31033 Unable to fetch Link source name
31034 Invalid Verb index
31035 Incorrect Clipboard format
31036 Error saving to file
31037 Error loading from file
31038 This control requires VB version 3.0 or greater
31039 Unable to access source document
Help:
Error Messages (Common Dialog)
Err Statement
Error Statement
Error$ Function
Resume Statement
Trappable Data Access Errors
Programmer's Guide:
Chapter 9, "Debugging"
Chapter 10, "Handling Run-Time Errors"