Import an existing module into vb 2008


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5

Thread: Import an existing module into vb 2008

  1. #1
    Join Date
    Jul 2007
    Posts
    142

    Import an existing module into vb 2008

    Import an existing module into vb 2008

    Can you help me please?

    I want to create a file (presumably a module) where I can keep all of my constant definitions so that I can import into my projects.

    I don't want to add the module to the solution because, as I understand it, that merely puts a copy of the module into the solution. If I add a new constant to it I have to update the master copy. I would rather keep the master copy open and add to that.

    Can you tell me if this is possible and if so how?

    Thanks,

    Steve

  2. #2
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    Quote Originally Posted by Steve36445 View Post
    I don't want to add the module to the solution because, as I understand it, that merely puts a copy of the module into the solution. If I add a new constant to it I have to update the master copy. I would rather keep the master copy open and add to that.
    There would be no master copy. There would be just one copy.

    If you create a module, and add it to 5 solutions there are not 5 copies of the module.

    There is only one copy of the module added to 5 different projects. If you make a change to this module, it will affect all 5 solutions because there is only one module.
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

  3. #3
    Join Date
    Jul 2007
    Posts
    142
    Thanks Hack,

    That clears up my misunderstanding.

    In the past I must must have copied them into my soluion directory before adding them.

    I suppose the same goes for forms?

    Thanks again,

    Steve

  4. #4
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    Quote Originally Posted by Steve36445 View Post
    I suppose the same goes for forms?
    Yes...and user controls and components and classes and...
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

  5. #5
    Join Date
    Jun 2004
    Posts
    93
    Yes, you can do this... you just have to know how. I do this frequently.

    Put the VB module in a "common" folder that you will share among multiple projects.

    In a project, right click and select "Add exiting item"
    Browse to the vb module in the common folder
    On the right side of the [Add] button, there is a little drop-down arrow. Click the arrow and select "Link to file"

    This leaves the vb module in the original location and references the location in your project. It will not copy to your project folder.

Similar Threads

  1. VB as a career choice?
    By steve in forum Careers
    Replies: 8
    Last Post: 08-08-2008, 10:46 AM
  2. VB .NET 2008 and Crystal Reports 2008
    By Christophe in forum .NET
    Replies: 1
    Last Post: 04-24-2008, 03:44 PM
  3. Sending mail with image problem
    By vikassheelgupta in forum Java
    Replies: 0
    Last Post: 01-06-2006, 02:12 AM
  4. Self-Interest & VS.NET
    By Zane Thomas in forum .NET
    Replies: 147
    Last Post: 01-31-2001, 02:00 PM
  5. Replies: 84
    Last Post: 01-29-2001, 02:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center