Link to home
Start Free TrialLog in
Avatar of afterburner
afterburner

asked on

Inherited this code

Couple of things about someone else's code that I am looking at. One is does anyone have an idea what this means:

 Version 1.0 CLASS
BEGIN
MultiUse = -1 'True
END

This is on the top of the page of the printout of the class, but does not appear when viewed in the IDE.

Also, the project complains when I try to load it that it cannot load mscomctl.ocx from the directory where the source files are. But a) I thought this .ocx should be in the Windows System dir, and secondly, the .ocx is registered anyway.

Any tips?

Thanks
ab.
Avatar of vinnyd79
vinnyd79

are you printing the class as a text file? You should print it from the IDE and you won't see the header info.
I think that the MultiUse attribute differentiates VB5 from VB6.

>that it cannot load mscomctl.ocx

Check to see if you have multiple ones registered.  You may have to unregister all of them then re-register just the one you're using.  Start by doing a Windows Find of that file, then unregister all if more than one is found.
ASKER CERTIFIED SOLUTION
Avatar of bob_online
bob_online

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of afterburner

ASKER

I cant open it first time to do this. Loading the project it complains that it cant find this .ocx, and asks me if I want to continue loading. I say yes, and there are other load errors, then eventually I get the project (what looks like the project) up. But if I try to view two of the three forms, then two are unavailable and the warning message comes up that it cant load the form from the source path.

What effect does just selecting the ocx have - dont get this.
Another choice is to copy the vbp (to back it up) then open the original in a text editor and remove all of the invalid references.

After you get a successful project-load (ignoring warnings of missing references, then start manually adding back those references.  Again, don't save the forms or your missing references will all turn into pictureboxes.

Once all of the references are back in, the project should load correctly as long as the references on your local machine are compatible with the original (i.e. all referenced properties, method, and events exist in your version.)