Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Inherited this code

Posted on 2002-05-15
5
Medium Priority
?
204 Views
Last Modified: 2013-11-25
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.
0
Comment
Question by:afterburner
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 28

Expert Comment

by:vinnyd79
ID: 7012572
are you printing the class as a text file? You should print it from the IDE and you won't see the header info.
0
 
LVL 22

Expert Comment

by:rspahitz
ID: 7012582
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.
0
 
LVL 5

Accepted Solution

by:
bob_online earned 200 total points
ID: 7013539
In vb source code files, there is a lot of information that is not visible in the ide editor.  Open a .frm file that has some controls on it as well as some code for an example.  The

Version 1.0 CLASS
BEGIN
MultiUse = -1 'True
END

is needed by vb in order to use the class module so don't mess with it.

The machine you're using probably has a different version of mscomctl.ocx that the version that is referenced in the projects .vbp file.

To resolve this open the project.  From the Project Menu, select components.  Hit the browse button and locate the ocx (should be in the system directory).  Select it.  Close the project from the menu option -- when it prompts you what files to save, save only the .vbp.  Next time you open the project, it should be ok.
0
 

Author Comment

by:afterburner
ID: 7013581
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.
0
 
LVL 22

Expert Comment

by:rspahitz
ID: 7014191
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.)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question