Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MSFlexGrid: The subject is not trusted for the specified action 9

Status
Not open for further replies.

ettienne

Programmer
Oct 29, 2005
3,388
US
When I add an MSFlexGrid to a VBA form I get an error message: The subject is not trusted for the specified action.

This has worked perfectly before and now a lot of customers are reporting the same error, so I suspect a Microsoft updated has something to do with it.
 
I have resolved the flexgrid issue with a simple line of code:

Code:
CreateObject("WScript.Shell").RegWrite "HKLM\SOFTWARE\Microsoft\Internet Explorer\ActiveX Compatibility\{6262D3A0-531B-11CF-91F6-C2863C385E30}\Compatibility Flags", 0, "REG_DWORD"

This sets the registry entry to 0 for the killbits, allowing the flexgrid to run again. You can do the same for other controls affected by the security update.
 
ettienne, How exactly do you impliment your solution. This problem has been driving me crazy. I hoped MS would resolve it, but I guess not. I am using the flexgrid in a vba form in Excel.
Thanks,
ssdiver2112
 
Um, insert that line of code in your macro...
 
ettienne,
I have not messed with the registry much so just to be clear, should this just be left in the code, or just run once per machine and then removed?

Thanks for your help
ssdiver2112
 
Leave it in the code, all it does is sets the registry entry to 0. This is a new registry entry created by KB960715 and defaulted to 400 to disable the control, setting it to 0 enables the control.
 
What license problem? There is no license problem... you are over thinking the issue.
 
ettienne,
OK here's the problem. I developed the VBA program on my machine which has VB6. I installed and registered the msflxgrd.ocx along with the Excel/VBA program on the other machines. Of course after the killbit update it stopped working. I updated VB6 on my machine and re-installed and registered the new flexgrid control to the other machines. Now I get a different error "License information for this component not found. You do not have an appropriate license to use this functionality in the design environment."
 
I had the licensing problem on my destination computers also. I'd be interested to hear if ettienne's solution works for that issue, wish I could have tried it before buying another grid.
 
Don't copy the updated VB6 ocx file, that will give you the license error, you need to go back to the original ocx file.
I have many sites running this way, there is not a single problem with it.
 
ettienne,
I put your code in the Workbook_Open event and I am getting this error when openning the Excel file on a different computer. Note: if it matters, I have XP and That computer has Vista

System Error &J80040111 (-2147221231). ClassFactory cannot supply requested class


Private Sub Workbook_Open()
CreateObject("WScript.Shell").RegWrite "HKLM\SOFTWARE\Microsoft\Internet Explorer\ActiveX Compatibility\" & _
"{6262D3A0-531B-11CF-91F6-C2863C385E30}\Compatibility Flags", 0, "REG_DWORD"
.
.
.
End Sub
 
It is most probably Vista security and UAC blocking the change to the registry. Try changing the registry entry manually.
 
Ettienne,

I put the workbook_open() code in my app and I am getting run time error 429, activeX component cannot create object.

Any ideas?

Software Sales, Training, Implementation and Support for Macola, Synergy, and Crystal Reports. Check out our Macola tools:
 
Check if you have rights to change the registry, if not then you will get an error.
 
I faced this error after a rampage of the Conficker virus hit our company and the IT technicians left loose the controls on which updates got auto installed on our network.

What I did to solve it (I don't have VB6) was to download the VB6 update, open the EXE file with 7-zip and extracted directly the MSFLEXGRID.OCX onto System32 and registered it.

My Apps in excel work flawlessly now.
 
But Here... if you had a commercial application already distributed that used MSFlexGrid, would you be OK with forcing your end users to download and install the VB6 update? This problem needs to be fixed without having to do that or have them mess with their registries, don't you agree?

So far the best solution I've seen is to replace FlexGrid with a 3rd party control and redistribute it. Just my HO...
 
MSFLEXGRID.OCX? On my machine this is mshflxgd.ocx. Please clarify if you actually have a different file name.

Software Sales, Training, Implementation and Support for Macola, Synergy, and Crystal Reports. Check out our Macola tools:
 
Dgillz... there are 2 MS FlexGrids, the one with the 'h' (Hierarchical) will have the same problems, along with several other MS controls, if I understand correctly.
 
I think that if you pull out the control(s) out of the VB6 update and then distribute them to your clients, maybe with an "install" procedure or batch or something, to automate the replacement of the "untrusted" control.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top