How do you make GlobalMultiUse Instancing (VB 6.0) work in VB.Net?

Posted on 2007-07-31
Last Modified: 2013-11-26
In VB 6.0 I was able to create a library with classes that were set as GlobalMultiUse.  Whenever I referenced this dll in a project, I didn't have to declare the object to use a function from one of the classes.  I was able to just call the name of the function or procedure and it knew that is was from the referenced dll.  Is there a way to do this in .Net?
Question by:vb9666
    LVL 96

    Assisted Solution

    by:Bob Learned
    You can use an Imports statement with VB.NET to short-cut syntax requirements, but there isn't any direct relationship for GlobalMultiUse.

    LVL 38

    Assisted Solution

    If you include a module in your library with public methods, you will be able to access them like this... You still have to use the library namespace, so you would have to use:

    Imports MyLibraryNamespace

    LVL 142

    Accepted Solution

    you need to declare the class (and the methods) as static.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
    Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
    This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

    734 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

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now