Vba error codes in Excel
As seen from the previous chapter, there are two types of errors in VBA and within each type, there are a number of subsets.
For example, the compile time error may be due to wrong syntax, unassigned variable,undeclared variable or wrong placement of the keywords and so on.
Similarly, there are a number of reasons for runtime error too.
But, all the errors, irrespective of the type, has some number (code) associated with it.
These codes help identify the errors easily, since each code corresponds to a particular error only and always.
For example, error code 6 always implies an overflow.
There are a number of error codes in VBA, some of which are as follows:
51 : Internal error.
52 : Bad Filename or number.
53 : File not found.
54 : Bad File mode.
55 : File already open.
57 : Device lnput/Output (l/O) error.
58 : File already exists.
59 : Bad record length.
61 : Disk full.
62 : Input past and of ?le.
63 : Bad record number.
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.
321 : Invalid file format.
322 : Can�t create necessary temporary file.
325 : Invalid format in resource file.
380 : Invalid property value.
381 : Invalid property array index.
382 : Set not supported at runtime.