OCX works in XL2002, not in XL2003

M

Marcusmaximus

Kodak's old ImgEdit.ocx has worked for me with every 32bit version of
Win32 and Excel up to 2002. But opening an XL2002 workbook (with an
ImgEdit control embedded on a sheet) in XL2003 fails: although the last
saved image displays, the control is no longer there as an embedded
OLEObject, and isn't recognised by vba.

It's there in the XL2003 Tools/Refererences of course, and it's icon
even appears in the sheet toolbox. But trying to drop ImgEdit onto a
2003 sheet returns a "Cannot insert object" error, while trying to drop
it onto a form returns "The subject is not trusted for the specified
action" error.

It 'feels' like the previously satisfactory ImgEdit registry entries
don't work for XL2003. Any ideas, anyone?
 
N

NickHK

I just tried it in XL2002 and recieved those errors, so it's not an XL
version issue, probably a licensing/registry problem.
Trying to fix it. Will let you know.

NickHK
 
N

NickHK

I can use this control in VB6, so design time licensing is OK.
Still no joy in XL2002 though.

NickHK
 
M

Marcusmaximus

Thanks NickHK

The control registers easily using Regsvr32 and only needs oieng400.dll
and imgcmn.dll to be in \system32\. It shouldn't give any trouble in
2002.

One possible clue I found relates to its version number in the
registry, see http://support.microsoft.com/kb/q171280/. The Win2k OCX
registers in the registry as ver 2.2 which would be about right (the
latest Pro version is ver 2.8), but if you rightclick the OCX, under
properties it is ver 5.00, and in code ImgEdit1.GetVersion returns
"5.00.2195.6601", which would also be about right for the "lite"
bundled version.

I've tried tweaking the version numbers in the registry but not found a
combination to fix it for 2003. I can send you some code to make it
run in XL2002 with intellisense, if that would help.

I'm mighty grateful for your help - thanks again.
 
N

NickHK

It certainly seems like some difference in the way XL2002/03 deal with the
licensing of control or versioning as you say :

XL2000: Fine
VB6: Fine
XL2002: "Can't insert object"
XL2002 with imgedit.ocx wrapped in VB6 custom control : Fine

What is your fix for XL2002 ?

NickHK
 
M

Marcusmaximus

Thanks again NickHK

Sorry for the slow reply; I've been outa town.

Hmmm, I'm in more trouble than I thought :) So you're not kidding
about XL2002 and it's not a typo, huh? The thing is, I don't have a
'fix' for XL2002 because I've never had a problem with my XL2002. I
have:

XL2000: drops fine on both a sheet and a form
VB6: drops fine on a form
XL2002: drops fine on both a sheet and a form, loads in the forms
toolbox
XL2003 Sheet: "Can't insert object"
XL2003 Form: "The subject is not trusted for the specified action"

Scary. Do we have different versions of 2002? I guess mine has Spk2.
Looking in Help/About, I have:

Sheet: MS Excel 2002 (10.2614.2625)
Project: MS Visual Basic 6.3, then below,
Version: 9108 VBA: Retail 6.3.8863 Forms3: 2.01

Maybe we can progress this by ignoring 2003 for a mo, and see if we can
identify the difference between your XL2002 and mine? By comparing the
ImgEdit registry entries? Any suggestions?

Or, if you've wrapped the control in VB6 and it works - I don't know
how to do that - could I try your wrapped version in 2003?

Mark
 
N

NickHK

Mark,
OK, after finding an article (lost the link now, so I can't credit the OP,
but on Experts Exchange I think), this fixed it for me:
Edit the registry key "Compatability Flags" from 400 to 0
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\ActiveX
Compatibility\{6D940280-9F11-11CE-83FD-02608C3EC08A}

That's the GUID for my version of the imgedit.ocx.

Search your registry for "Imaging.EditCtrl.1" to see what GUID you have.

As for other users of your workbook, if they have these IE/Office
versions/updates that cause this, they will be able to use it.
Changing the registry may be options if they have access.

Actually, here you go. The first 4 or 5 articles should tell all you need.
Watch for word wrap:
http://www.google.co.uk/search?as_q...tesearch=microsoft.com&as_rights=&safe=images

NickHK
 
M

Marcusmaximus

Thanks NichHK

Top marks! On first test, you're right on the money with cause and
solution, and for XL2003 too. I never even got close to this line of
inquiry. XL2003 opened a big information box which delivered a lecture
warning about initialising unsafe activex controls. When I ok'd that,
my app started correctly.

There may be other complications but none yet. In the interim, for my
users - they're all over the country - I guess I can run a vbscript to
fix the compatability flags? Or can I do it in my vba code, do you
know?

For a longer term fix, can I bypass the "unsafe controls" warning? -
it's a bit scary for novice domestic users (my clients). I sense I may
need to self-cert this or any ocx control I use? Do I need to wrap it
in my own vb6 code, maybe? - I'm a novice too.

How would I best be proactive in staying ahead of this issue for the
next Office release?

Muchas gracias - Mark
 
N

NickHK

I haven't read through all these details yet, but as this affects all Office
apps and system wide, I would not recommend changing user reg setting
automatically. After all, they may want them that way.
You could pop up a warning and explanation with the option to change,
assuming the user can write to that area of the registry. If not they can't
use your software.
The alternative is to wrap these unsigned controls in a VB5/6 custom control
or find signed versions of similar controls.

NickHK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top