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!

Moving between dev environments ActiveX problem

Status
Not open for further replies.

MattSTech

Programmer
Apr 10, 2003
333
US
I, like many of you, have been holding on to VB6. I have a Win7 environment with MSCOMCTL.ocx in the System32 directory and a Windows 8.1 machine with MSCOMCTL.ocx in the sysWOW directory. Both machines have VB6 installed and working well. The dependency works fine when a project is started and loaded in each environment. (listview control)

An visual basic project started (and working fine) on the Win7 machine refuses to open on the 8.1 machine, it stalls on the MSCOMCTL.ocx dependency. I have tried registering using regsvr32 mscomctl.ocx, but 8.1 isn't having any of that.

Is there something I can change in the vbp file to make this work?
 
For reasons independent of VB6, Microsoft began shipping mscomctl.ocx with interfaces updated from the long-standing 2.0 to 2.1 a while back, generally through Windows Update.

The first thing to check is whether you have tampered with the Upgrade ActiveX Controls checkbox on the General tab of the Project Properties dialog. This should almost always be checked.

Next look at MS12-060: Description of the security update for 2007 Office system: August 14, 2012 which should have turned up if you had dome a search on this issue. Ignore the fact that it discusses Office, the arrogant Office Team at Microsoft is simply the responsible culprit here. Avoid the "Fixt-It" scripts there and follow the instructions for manually repairing it.

Be cautious to do this elevated, and run the proper version of regsvr32.exe, your safest bet might be to use the provided .BAT script there, but:

Note You must run the commands from commands at an elevated command prompt with administrator permissions.


The suspicious thing here is why your Windows 7 machine was never updated, because this patch was pushed out quite widely, even to machines with no version of Office installed.

The VBP file should contain the line:

Code:
Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.1#0; MSCOMCTL.OCX

If the 2.1 is a 2.0 you might have trouble even after the fix.

In that case the easiest step might indeed be to alter the 2.0 to 2.1, but test this on a copy of your project folder. However the Upgrade ActiveX Controls project option is meant to take care of this for you.
 
The .vbp file created on the windows 7 machine contains the 2.1 reference. The Windows 8.1 machine it seems is stuck on the 2.0. I will keep digging, thank you for the lead. Will post back after a short bit.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top