Run-Time Error Codes
◄Contents► ◄Index► ◄Back►
──────────────────────────────────────────────────────────────────────────────
Run-Time Error Codes
■ Run-time errors can occur while an application is running, either within
the Visual Basic environment or as a stand-alone executable file. Some of
these errors can also occur during design time or compile time.
■ You can test and respond to these errors using the ON ERROR statement and
the ERR function. See: ◄ERR Function► ◄ON ERROR Statement►
■ While developing in Visual Basic, you can get help on any error message by
pressing the F1 key.
■ Visual Basic trappable error codes are:
Code Message
════ ════════════════════════════════════════════════════════════════════
1 NEXT without FOR
2 Syntax error
3 RETURN without GOSUB
4 Out of DATA
5 Illegal function call
6 Overflow
7 Out of memory
8 Label not defined
9 Subscript out of range
10 Duplicate definition
11 Division by zero
12 Illegal in direct mode
13 Type mismatch
14 Out of string space
16 String formula too complex
18 FUNCTION not defined
19 No Resume
20 Resume without error
24 Device timeout
25 Device fault
26 FOR without NEXT
27 Out of paper
29 WHILE without WEND
30 WEND without WHILE
33 Duplicate label
35 SUB or FUNCTION not defined
37 Argument-count mismatch
38 Array not defined
40 Variable required
50 FIELD overflow
51 Internal error
52 Bad file name or number
53 File not found
54 Bad file mode
55 File already open
56 FIELD statement active
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
69 Communication-buffer overflow
70 Permission denied
71 Disk not ready
72 Disk-media error
73 Feature unavailable
74 Can't rename with different drive
75 Path/File access error
76 Path not found
80 Feature removed
81 ISAM - Invalid name
82 ISAM - Table not found
83 ISAM - Index not found
84 ISAM - Invalid column
85 ISAM - No current record
86 ISAM - Duplicate value for unique index
87 ISAM - Invalid operation on NULL index
88 ISAM - Database inconsistent
89 ISAM - Insufficient ISAM buffers
260 No timer available
271 Invalid screen mode
272 Invalid when forms are showing
340 Control array element does not exist
341 Invalid object array index
342 Not enough room to allocate control array
343 Object not an array
344 Must specify index for object array
345 Reached limit: cannot create any more controls for this form
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
381 Invalid property array index
382 Property can't be set at run time
383 Property is read-only
384 Property can't be modified when form is minimized or maximized
385 Must specify index when using property array
386 Property not available at run time
387 Property can't be set on this control
400 Form already displayed; can't show form modally
401 Can't show non-modal form when a modal form is being displayed
402 Must close or hide topmost modal form first
403 MDI form cannot be shown modally
410 Property can't be modified on MDI form
420 Invalid object reference
421 Method not applicable for this object
422 Property not found
423 Property or control not found
424 Object required
425 Invalid object use
430 No currently active control
431 No currently active form
480 Can't create AutoRedraw image
─────────────────────────────────────────────────────────────────────────
See: ◄ERROR Statement► ◄ERROR$ Function►
◄Resolving a Run-Time Error► ◄RESUME Statement►