Click here to Skip to main content
15,887,175 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
So the setup is as follows:
1. I have an Access VBA project which I have to maintain until we move everything over onto a new shiny platform.
2. This VBA project contains numerous reports, which use a .OCX charting component. This component was written about 15 years ago in C++. I have access to the code, but it won't compile right now because I can't get my hands on the correct version of the toolchain used to create it. At some point I may end up actually reworking the code just to get it to compile.
3. I can register the OCX using regsvr32, BUT;
i. Curious Thing. If I use the /i switch with regsvr32 like you're supposed to, it doesn't work. It says something about not finding an entry point.
ii. If I use it without the /i switch, it seems to go off without a hitch. I see entries in the registry for the ocx file with the correct location etc.
4. When I run the Access code and generate a report, I get a "this control does not contain an Object" error when I attempt to call into a property of the OCX class I'm using called "Object".

Does anyone have any ideas?

What I have tried:

5. I've tried removing and re-adding the reference. Still no go.
6. I've used OLEViewer to peek at the component, but when I try to View Type Information it gives me "Library not loaded".
Posted
Updated 21-Jun-17 0:54am
Comments
[no name] 28-Jun-17 14:30pm    
Hi.

Keep in mind that Microsoft periodically issues out "ActiveX Kill Bits" which may or may not be your problem.

https://blogs.msdn.microsoft.com/vsod/2009/06/04/visual-basic-6-controls-stop-working-after-security-advisory-960715/

1 solution

The /I switch does not seem to be needed according to: [how-to-register-an-activex-control]
If the .OCX file is not located in your windows/system32/ folder you must add the file path before the filename.ocx
Oh, and don't forget to run with administrator rights !

You can also try:
cd \Windows\SysWOW64
Regsvr32 /u {Filename.ocx}  
Regsvr32 {Filename.ocx}
 
Share this answer
 
v3
Comments
Mel Padden 21-Jun-17 10:07am    
"If the .OCX file is not located in your windows/system32/ folder you must add the file path before the filename.ocx"

Does that apply even when you are running the command prompt in the same directory as the OCX? Seems wrong... The registry record written contains the full filepath.
RickZeeland 21-Jun-17 10:15am    
I copied that from a web page, seemed ok to me, better safe than sorry !

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900