Error 48: Error in loading DLL

Error 48: Error in loading DLL

 

A dynamic-link library (DLL) is a library specified in the Lib clause of a Declare statement. Possible causes for this error include:

  • The file is not DLL executable.
  • The file is not a Microsoft Windows DLL.
  • The DLL references another DLL that is not present.
  • The DLL or referenced DLL is not in a directory specified in the path.

To correct this error

  • If the file is a source-text file and therefore not DLL executable, it must be compiled and linked to a DLL-executable form.
  • If the file is not a Microsoft Windows DLL, obtain the Microsoft Windows equivalent.
  • If the DLL references another DLL that is not present, obtain the referenced DLL and make it available.
  • If the DLL or referenced DLL is not in a directory specified by the path, move the DLL to a referenced directory.


Error 47: Too many DLL application clients

Error 47: Too many DLL application clients

The dynamic-link library (DLL) for Visual Basic can only accommodate access by 50host applications at a time. This error has the following cause and solution:

Your application and other applications that are Visual Basic hosts (some of which may be accessed by your application) are all attempting to access the Visual Basic DLL at the same time. Reduce the number of open applications accessing Visual Basic.


Error 28: Out of stack space

The stack is a the working memory of the computer and it expands and contracts based on the demands of the programs running on the computer.  If your VBA is too labor intensive it will cause the stack to overflow and throw error 28 out of stack space.   Its limits have been exceeded.

To correct this error

  1. Check that procedures are not nested too deeply.

  2. Make sure recursive procedures terminate properly.
  3. If local variables require more local variable space than is available, try declaring some variables at the module level. You can also declare all variables in the procedure static by preceding the PropertySub, or Functionkeyword with Static. Or you can use the Static statement to declare individual static variables within procedures.
  4. Redefine some of your fixed-length strings as variable-length strings, as fixed-length strings use more stack space than variable-length strings. You can also define the string at module level where it requires no stack space.
  5. Check the number of nested DoEvents function calls, by using the Calls dialog box to view which procedures are active on the stack.
  6. Make sure you did not cause an "event cascade" by triggering an event that calls an event procedure already on the stack. An event cascade is similar to an unterminated recursive procedure call, but it is less obvious, since the call is made by Visual Basic rather than an explicit call in the code. Use the Calls dialog box to view which procedures are active on the stack.
  • You have too many active FunctionSub, or Property procedure calls. Check thatprocedures aren't nested too deeply. This is especially true with recursive procedures, that is, procedures that call themselves. Make sure recursive procedures terminate properly. Use the Calls dialog box to view which procedures are active (on the stack).
  • Your local variables require more local variable space than is available.

    Try declaring some variables at the module level instead. You can also declare all variables in the procedure static by preceding the PropertySub, or Function keyword with Static. Or you can use the Static statement to declare individual Static variables within procedures.

  • You have too many fixed-length strings. Fixed-length strings in a procedure are more quickly accessed, but use more stack space than variable-length strings, because the string data itself is placed on the stack. Try redefining some of your fixed-length strings as variable-length strings. When you declare variable-length strings in a procedure, only the string descriptor (not the data itself) is placed on the stack. You can also define the string at module level where it requires no stack space. Variables declared at module level are Public by default, so the string is visible to all procedures in the module.

  • You have too many nested DoEvents function calls. Use the Calls dialog box to view which procedures are active on the stack.
  • Your code triggered an event cascade. An event cascade is caused by triggering an event that calls an event procedure that's already on the stack. An event cascade is similar to an unterminated recursive procedure call, but it's less obvious, since the call is made by Visual Basic rather than by an explicit call in your code. Use the Calls dialog box to view which procedures are active (on the stack).


List of VBA Error Codes

List of VBA Error Codes

CodeMessage
NAAutomation error: The object invoked has been disconnected from its clients
NAaCode execution has been interrupted
NACompile error: User-defined type not defined
0No error
3Return without GoSub (obsolete, no longer used)
5Procedure call or argument is not valid (Visual Basic)
6 Overflow(Visual Basic Error)
6 Overflow (Visual Basic Run-Time Error)
7Out of memory (Visual Basic Compiler Error)
7Out of memory (Visual Basic Run-Time Error)
9Subscript out of range (Visual Basic)
10This array is fixed or temporarily locked (Visual Basic)
11Division by zero (Visual Basic Run-Time Error)
13Type mismatch (Visual Basic)
14Out of string space (Visual Basic)
16Expression too complex
17Can't perform requested operation (Visual Basic)
18User interrupt occurred
20Resume without error
28Out of stack space
35Sub or function not defined
47Too many DLL application clients
48Error loading DLL
49Bad DLL calling convention
51Internal error (Visual Basic)
52Bad file name or number
53File not found (Visual Basic Run-Time Error)
54Bad file mode
55File already open
57Device I/O error
58File already exists
59Bad record length
61Disk full (Visual Basic)
62Input past end of file
63Bad record number
67Too many files
68Device unavailable
70Permission denied (Visual Basic)
71Disk not ready
74Cannot rename with different drive
75Path/File access error
76Path not found
91Object variable or With block variable not set
92For loop not initialized (Visual Basic)
93Invalid pattern string
94Invalid use of Null (obsolete, no longer used)
95Application-defined or object-defined error
96Unable to sink events of object because the object is already firing events to the maximum number of event receivers it supports
97Cannot call friend function on object which is not aninstance of defining class
98 A property or method call cannot include a reference to a private object, either as an argument or as a return value
100Class does not implement the System.Collections.ICollection interface
298System resource or DLL could not be loaded
320Cannot use character device names in specified file names
321File format not valid
322Can't create necessary temporary file
325Format not valid in resource file
327Data value named not found
328Illegal parameter; can't write arrays
335Could not access system registry
336ActiveX component not correctly registered
337ActiveX Component not found
338ActiveX Component did not run correctly
360Object already loaded
361Can't load or unload this object
363ActiveX Control specified not found
364Object was unloaded
365Unable to unload within this context
368The specified file is out of date
371The specified object can't be used as an owner form for Show
380Property value is not valid
381Property array index is not valid
382Set not supported at run time
383Set not supported (read-only property)
385Need property array index
387Set not permitted
393Get not supported at run time
394Get not supported (write-only property)
400Form already displayed; can't show modally
402Code must close topmost modal form first
422Property not found
423Property or method not found
424Object required (Visual Basic)
429Cannot create ActiveX Component
430Class does not support Automation or does not support expected interface
432File name or class name not found during Automation operation (Visual Basic)
438Object doesn't support this property or method (Visual Basic)
440Automation error
442Connection to type library or object library for remote process has been lost
443Automation object does not have a default value
445Object doesn't support this action (Visual Basic)
446Object doesn't support named arguments
447Object doesn't support current locale setting (Visual Basic)
448Named argument not found (Visual Basic)
449Argument not optional (Visual Basic)
450Wrong number of arguments or property assignment not valid
451Property let procedure not defined and property get procedure did not return an object
452Ordinal is not valid
453Specified DLL function not found
454Code resource not found
455Code resource lock error
457This key is already associated with an element of this collection
458Variable uses an Automation type not supported in Visual Basic
459Object or class does not support the set of events
460Clipboard format is not valid
461Method or data member not found
462The remote server machine does not exist or is unavailable (Visual Basic)
463Class not registered on local machine
481Picture is not valid
482Printer error
735Cannot save file to TEMP
744Search text not found
746Replacements too long
999Stop statement encountered
32768Feature not yet implemented


VBA error types

VBA Error Types

Compile Errors:  Errors that are recognized by the VBA compiler which stops the macro before it begins running.  Compile error must be resolved before the macro can run.

Runtime Errors:  Error that occurs when macro is running.  Runtime errors stop the macro mid sequence and will allow you to click debug to check what line is causing the error.  Error handlers can be used to prevent the macro from stopping and debugging.

Logical Errors:  Nothing coded incorrectly so there are NO hardblocks that would prevent the macro from running.  However the logic of the macro may be incorrect causing an incorrect result.


VBA Error Handlers

On Error Resume Next – Will continue running macro regardless of errors.

On Error GoTo 0 – Resets Error handling to default setting.  Will debug on runtime errors.

On error GoTo ErrorHandlerName –  Will run the code thats under the ErrorHandlerName: when a runtime error occurs.

On Error GoTo ErrorHandlerName
Exit Sub

ErrorHandlerName:
 'Error handling code goes  here, on error macro will go to this section and run this error handling code.
End Sub

vba error handlers


Add new Admin User for wordpress using FTP

Add new Admin User for wordpress using FTP

Add this code to the end of your functions.php file.  It will add a new admin user to your wordpress site in the event you’ve been locked out of your site.

Steps:

  1. Access the files to your website using FTP
  2. Download your functions.php file
  3. Open the file in a text editor
  4. Update the username, password and email
  5. Add below code to the end of the functions.php file
  6. Save file and upload back to your site

function add_admin_acct(){     $login = 'myacct1';     $passw = 'mypass1';     $email = 'myacct1@mydomain.com';     if ( ! username_exists( $login )  && ! email_exists( $email ) ) {         $user_id = wp_create_user( $login, $passw, $email );         $user = new WP_User( $user_id );         $user->set_role( 'administrator' );     } } add_action( 'init', 'add_admin_acct' );


VBA Error Message database

CodeMessage
NAAutomation error: The object invoked has been disconnected from its clients
NAaCode execution has been interrupted
NACompile error: User-defined type not defined
0No error
3Return without GoSub (obsolete, no longer used)
5Procedure call or argument is not valid (Visual Basic)
6 Overflow(Visual Basic Error)
6 Overflow (Visual Basic Run-Time Error)
7Out of memory (Visual Basic Compiler Error)
7Out of memory (Visual Basic Run-Time Error)
9Subscript out of range (Visual Basic)
10This array is fixed or temporarily locked (Visual Basic)
11Division by zero (Visual Basic Run-Time Error)
13Type mismatch (Visual Basic)
14Out of string space (Visual Basic)
16Expression too complex
17Can't perform requested operation (Visual Basic)
18User interrupt occurred
20Resume without error
28Out of stack space
35Sub or function not defined
47Too many DLL application clients
48Error loading DLL
49Bad DLL calling convention
51Internal error (Visual Basic)
52Bad file name or number
53File not found (Visual Basic Run-Time Error)
54Bad file mode
55File already open
57Device I/O error
58File already exists
59Bad record length
61Disk full (Visual Basic)
62Input past end of file
63Bad record number
67Too many files
68Device unavailable
70Permission denied (Visual Basic)
71Disk not ready
74Cannot rename with different drive
75Path/File access error
76Path not found
91Object variable or With block variable not set
92For loop not initialized (Visual Basic)
93Invalid pattern string
94Invalid use of Null (obsolete, no longer used)
95Application-defined or object-defined error
96Unable to sink events of object because the object is already firing events to the maximum number of event receivers it supports
97Cannot call friend function on object which is not aninstance of defining class
98 A property or method call cannot include a reference to a private object, either as an argument or as a return value
100Class does not implement the System.Collections.ICollection interface
298System resource or DLL could not be loaded
320Cannot use character device names in specified file names
321File format not valid
322Can't create necessary temporary file
325Format not valid in resource file
327Data value named not found
328Illegal parameter; can't write arrays
335Could not access system registry
336ActiveX component not correctly registered
337ActiveX Component not found
338ActiveX Component did not run correctly
360Object already loaded
361Can't load or unload this object
363ActiveX Control specified not found
364Object was unloaded
365Unable to unload within this context
368The specified file is out of date
371The specified object can't be used as an owner form for Show
380Property value is not valid
381Property array index is not valid
382Set not supported at run time
383Set not supported (read-only property)
385Need property array index
387Set not permitted
393Get not supported at run time
394Get not supported (write-only property)
400Form already displayed; can't show modally
402Code must close topmost modal form first
422Property not found
423Property or method not found
424Object required (Visual Basic)
429Cannot create ActiveX Component
430Class does not support Automation or does not support expected interface
432File name or class name not found during Automation operation (Visual Basic)
438Object doesn't support this property or method (Visual Basic)
440Automation error
442Connection to type library or object library for remote process has been lost
443Automation object does not have a default value
445Object doesn't support this action (Visual Basic)
446Object doesn't support named arguments
447Object doesn't support current locale setting (Visual Basic)
448Named argument not found (Visual Basic)
449Argument not optional (Visual Basic)
450Wrong number of arguments or property assignment not valid
451Property let procedure not defined and property get procedure did not return an object
452Ordinal is not valid
453Specified DLL function not found
454Code resource not found
455Code resource lock error
457This key is already associated with an element of this collection
458Variable uses an Automation type not supported in Visual Basic
459Object or class does not support the set of events
460Clipboard format is not valid
461Method or data member not found
462The remote server machine does not exist or is unavailable (Visual Basic)
463Class not registered on local machine
481Picture is not valid
482Printer error
735Cannot save file to TEMP
744Search text not found
746Replacements too long
999Stop statement encountered
32768Feature not yet implemented