Microsoft Visual Basic System Error &H80004005 (-2147467259) with McAfee

Asked By 30 points N/A Posted on -
qa-featured

Hello experts

I have an excel based application created using Excel4 macros and VBA.

It keeps on getting "Microsoft Visual Basic System Error &H80004005 (-2147467259)" error at startup when using McAfee antivirus. The same application works fine with other antivirus software. Is there any security option in McAfee to block VBA and excel4 macros?

I don't have any idea about McAfee security settings since I'm new to it.

Make sure to tell me if I have any option to block macros via McAfee controls.

 

 

SHARE
Answered By 0 points N/A #110606

Microsoft Visual Basic System Error &H80004005 (-2147467259) with McAfee

qa-featured

Hi there,

This problem normally happens when there is an error in any of the windows classes implemented by the comctl32.dll. This problem normally occurs when after building a .exe file from VB 6.0 and is attempted to be run outside the VB IDE.

To fix the problem, you have to call up the following command in your ActiveX control

“InitCommonControls(void)” or “InitCommonControlsEx(LPINITCOMMONCONTROLSEX lpInitCtrls)”

This command ensures that the comctl32.dll is loaded and initialized whether it’s executed in a VB IDE or natively on windows.

There is another way of calling InitCommonControls from the control’s code. The command is shown below.

“Private Declare Sub InitCommonControls Lib "comctl32.dll" ()”

And add a call to

“InitCommonControls”

Hope that helps.

Login/Register to Answer

Related Questions