Trappable Errors

Trappable Errors



See Also15YHI1Y

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 timeCFSL0V or compile time.  You can test and respond to trappable errors using the On Error3PFT0KD statement and the Err3XXD805 function.

Remember, while developing in Visual Basic you can get help on any message by pressing F1.

Code Message


        3   Return without GoSub5C0106F

        5   Illegal function call43RD0QM

        6   Overflow5C0103U

        7   Out of memory43RD0ZW

        9   Subscript out of range1U9URSG

      10   Duplicate definition43RD0ON

      11   Division by zero1U9UCYZ

      13   Type mismatch5C0108L

      14   Out of string space5C0103R

      16   String formula too complex43RD0N2

      17   Can't continue43RD0NX

      19   No Resume43RD0Z1

      20   Resume without error5C0106D

      28   Out of stack space1U9UNWI

      35   Sub or Function not defined5C0109R

      48   Error in loading DLL1U9UCPA

      49   Bad DLL calling convention1H0UDSZ

      51   Internal error1U9UHIG

      52   Bad file name or number1U9UAJC

      53   File not found4I3ZCYP

      54   Bad file mode1U9UAJB

      55   File already open1U9UEED

      57   Device I/O error1U9UHS0

      58   File already exists1U9UEE0

      59   Bad record length1U9UAVA

      61   Disk full1U9UCJA

      62   Input past end of file1U9UQT0

      63   Bad record number1U9UAVC

      64   Bad file name1U9UHJC

      67   Too many files4I3ZQXP

      68   Device unavailable1U9UCR6

      70   Permission denied1U9UOVB

      71   Disk not ready1U9UCRG

      74   Can't rename with different drive1U9UQE9

      75   Path/File access error1U9UOE0

      76   Path not found4I3ZMYP

      91   Object variable not set12R5D8N

      92   FOR loop not initializedXAYQCQ

      93   Invalid pattern string2EFY614

      94   Invalid use of NullQYP4X0

      95   Cannot destroy active form instanceHIA3GL

     281   No More DDE channels566MPK

     282   No foreign application responded to a DDE initiate0YVC5T

     283   Multiple applications responded to a DDE initiateQ5WOV5

     284   DDE channel lockedFWH8LR

     285   Foreign application won't perform DDE method or operationYUA973

     286   Timeout occured while waiting for DDE response91V60RX

     287   User pressed ESC key during DDE operationAX0446

     288   Destination is busyYU5MGA

     289   Data not provided in DDE operation2JHAXKT

     290   Data in wrong format1LDX963

     291   Foreign application quit70T713

     292   DDE conversation closed or changedRDC2SS

      293    DDE method invoked with no channel openFUMJSH

     294   Invalid DDE Link format3LV1GH

     295   Message queue filled; DDE message lost2EXW8MM

     298   DDE requires DDEML.DLL11C5VAF

     320   Can't use character device names in filenames: 'item'3JYANKP

     321   Invalid file format1JEHHSH

     341   Invalid object array index2S5WLT5

     342   Not enough room to allocate control array 'item'3QQRPH

     343   Object not an arrayJ4VMAX

     344   Must specify index for object arrayFP2MLQ

     360   Object already loadedIP4A81

     361   Can't load or unload this object6QR49H7

     362   Can't unload controls created at design time12OKRZ4

     363   Custom control 'item' not found5YSW0R1

     364   Object was unloadedIL6AVV

     365   Unable to unload within this contextXPUAN5

     380   Invalid property valueRWKEMX

     382   'item' property cannot be set at run time62IH0NS

     383   'item' property is read-onlyIIQIKF

     384   'item' property can't be modified when form is minimized or maximized68UU30

     385   Must specify index when using property array1LKKHFS

     386   'item' property not available at run time1TPGYNZ

     387   'item' property can't be set on this controlB222UH

     388   Can't set Visible property from a parent menuEJQSN0

     391   Name not available.614JIK

     392   MDI Child forms cannot be hiddenETW18W

     393   'item' property cannot be read at runtime9GRXMV

     394   'item' property is write-onlyS0DMTZ

     400   Form already displayed; can't show modally3MWDYCX

     401   Can't show non-modal form when a modal form is displayedLSTQIT

     402   Must close or hide topmost modal form first1JF3I8B

     403   MDI forms cannot be shown modally2D6ABX3

     404   MDI child forms cannot be shown modally.9LMM9UK

     420   Invalid object reference1JEQTHP

     421   Method not applicable for this object343BRS5

     422   Property 'item' not found4G33IB

     424   Object required3R9Y6Q5

     425   Invalid object useZX6EJY

     426   Only one MDI form allowedBS3RBE

     460   Invalid clipboard format6WB52X

     461   Specified format does not match format of dataBUXYME

     480   Can't create AutoRedraw imageKX8FA8

     481   Invalid picture1SLO2I

     482   Printer error1HS72PL

     708   File not found: |1FOWJU5

     710   File already open: |28Y8J4N

     712   Device IO error: |1FOWMV4

     713   File already exists: |1FOWJH4

     716   Disk full: |TFKI5V

     719   Bad file name: |TFKN5X

     722   Too many files: |1FOWXT5

     725   Permission denied: |TFKUAW

     730   Path access error: |1FOWTH4

     731   Path not found: |1FOWTU5

     732   Must have startup form or Sub Main()32ZZXB7

     735   Can't save file to TEMP7AI58G

     740   Invalid procedure name1NRQ2WK

     742   Not enough room to paste contents into current linePH8RPM

     743   Unable to set next statementJJDZCE

     744   Search text not foundJWFQXU

     745   Text would be too long. Edit prevented198ELRL

     746   One or more replacements too long and not made1X9WP2P

     747   Syntax errors produced while replacing18HN87L

     748   An undo error has occurred. Further undo is unavailable83RX8UE

     749   Watch expression too long. Expression truncated.4N4XP9

     750   An expression must be selected2ZXW54D

     752   Error reading Tutorial file 'item'2DZHP82

     753   Tutorial directory 'item' not foundEIKP8H

     754   Can't find Tutorial file 'item'6CUX8VH

     755   Not enough memory to load Tutorial5AWD2B

     756   Duplicate procedure name20DCC7

     757   Can't find Windows Help .EXE fileRSSMDK

     758   Control must be same type as rest of array42UTKQ5

     759   Array already has a control at index 'item'8LF9IS

     760   Not a legal object name: 'item'1TSXGS7

     761   Must specify which item(s) to print123SBHN

     762   Can't clear INDEX property without changing NAME2L1SAVF

     764   | is a control name3JB20NY

     765   Controls without the align property cannot be placed directly on the MDI formALYBUA

     766   Event handler must be a Sub procedure12SJR3R

     768   Event procedure argument has incorrect data type1U7CF3P

     769   Menu subitem skipped a level51WZOH

     770   Can't put check mark here7XJWKR

     771   Can't assign shortcut key to menu name7VEUMS

     772   Can't use separator bar as menu name4ODH93E

     773   Menu control must have a nameIKWQ4C

     774   Menu control array element must have an indexEE30N8

     775   Menu control array indices must be in ascending orderDVYU0E

     776   Menu control array elements must be contiguous and within the same189DO6B

     777   Shortcut key already assigned215UBC4

     778   Separator may not be checked or disabled, or have an shortcut key28DTVY2

     779   At least one submenu item must be visible4QG00WZ

     780   Valid Range: [1..32]4BQB2V

     781   Valid Range:[24..1188]84I9P5

     783   Separator may not be the Window List menu210TK70

     784   Can't have more than one Window List menu1YPKXZN

     785   New not allowed on this typeQ6BIVA

20000   Can't load Custom Control DLL: 'item'A3DEKQ

20001   Can't unload Custom Control DLL; in useKP3AR9

20002   Can't quit at this timeQ68JGU

20003   You'll have to restart your program after this edit--proceed anyway?11XCQ2K

20004   'item' has been changed; must resetM85ZIA

20005   Reset halted programs so Code window can be closed?FP8XYN

20006   Not enough stack space to enter break mode--continue?H4XXHH

20007   Not enough stack space to enter break mode for error--must reset1N5853P

20008   Line too long to edit--edit truncated line?1HPD1SE

20009   Search complete2K6H16E

20011   Invalid command-line argument 'item'ZW7KS3

20012   Save changes to 'item'?1UG21T3

20013   You already have a control named 'item'.  Do you want to create a control array?42O8Y45

20014   Error loading 'item'.  The code associated with this form could not be loaded.  Continue loading form?8OZ30Y6

20015   Error loading 'item'.  An error was encountered loading a property.  Continue?3SJ859

20016   Error loading 'item'.  A control could not be loaded due to load error.  Continue?9ASAZL

20017   Form had old file format54KSZLU

20018   Replace existing 'item'?40HV26

20019   'item' does not exist356TQRZ

20020   'item' already exists in project3YZM06R

20021   '|' is a Read-Only file12GIE5K

20022   Errors during load. Refer to '|' for details51BZEZU

20023   '|' could not be loaded3Y6DZU

20024   Version number missing or invalid; Visual Basic 2.0 assumed.JRS643

20025   String value to long to process; form load aborted25EMZQA

20048   Line |1: The file |2 could not be loaded.9LVU35


Grid Messages

30000   Can not do a RemoveItem on a fixed rowWE2M7R

30001   Can not do an AddItem in a fixed rowWE2M7I

30002   Grid does not contain that rowWE2M7J

30004   Invalid Column number for alignmentWE2M7L

30005   Invalid Alignment valueWE2M7M

30006   Unable to Allocate Memory For GridWE2M7N

30008   Not a valid Picture typeWE2M7P

30009   Invalid Row ValueWE2M7Q

30010   Invalid Column ValueWE2LYR

30011   Unable to register the memory managerWE2LYI

30013   Invalid Row Height ValueWE2LYK

30014   Invalid Column Width Value WE2LYL

30015   Can not remove last non-fixed rowWE2LYM

30016   FixedRows must be one less than Rows valueWE2LYN

30017   FixedColumns must be one less than columns valueWE2LYO


OLE Messages

31001   Out of memory169TWW8

31003   Can't open ClipboardGGUCB8

31004   No object5MYYVRP

31006   Unable to close objectA4HNY8

31007   Can't paste13JIRFH

31008   Invalid property value1TK6SM

31009   Can't copy13IQJ12

31017   Invalid format1XE4SCB

31018   Class is not setZ4TSLF

31019   Source Document is not set2KW7VGF

31021   Invalid ActionCQIPMG

31022   Unable to initialize OLEEIQ1G8

31023   Invalid or unknown ClassDVCFM3

31024   Unable to create link13IZCYO

31026   Source name is too long58JY8O

31027   Unable to activate object5BI4LG

31028   Object not runningWALMCD

31029   Dialog already in use6OP8

31031   Invalid source for linkFG4TAN

31032   Unable to create embedded objectA6IAK7

31033   Unable to fetch Link source name1HBU8T6

31034   Invalid Verb indexFVAPQ4

31035   Incorrect Clipboard format28B5KX

31036   Error saving to fileRYAZL2

31037   Error loading from file1EA867P

31038   This control requires VB version 3.0 or greater12CWM83

31039   Unable to access source document1HRUV7N

See Also


Error Messages (Common Dialog)1AISWXD

Err StatementGU30FH

Error Statement5AEF2Y

Error$ Function5AEF2L

Resume StatementB4FKXK

Trappable Data Access Errors1374D0I>Right


Programmer's Guide:

Chapter 9, "Debugging"

Chapter 10, "Handling Run-Time Errors"