mdb as reference problem...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Matthew Wells

    mdb as reference problem...

    I have an mdb with class modules that I use as a reference for another mdb.
    The library is called MyLib.

    I'm trying to declare variables in my front end mdb as class objects in the
    library

    Dim x as MyLib.ClassModu leName

    This doesn't seem to work. When I type MyLib. and the intellisense pops up,
    all I see are public functions and enums. I don't see any class module
    names. How do I expose them?

    Thanks.

    Matthew Wells
    Matthew.Wells@F irstByte.net




  • UrbanSpaceman

    #2
    Re: mdb as reference problem...

    The way I work around this issue is to provide a public function in the
    library which returns a new instance of the object:

    Public Function New_ClassModule Name () as ClassModuleName
    Set New_ClassModule Name=new ClassModuleName
    End Function

    "Matthew Wells" <Matthew.Wells@ FirstByte.netwr ote in message
    news:o9KdnXmku_ 962AjbnZ2dnUVZ_ r2onZ2d@comcast .com...
    >I have an mdb with class modules that I use as a reference for another mdb.
    >The library is called MyLib.
    >
    I'm trying to declare variables in my front end mdb as class objects in
    the library
    >
    Dim x as MyLib.ClassModu leName
    >
    This doesn't seem to work. When I type MyLib. and the intellisense pops
    up, all I see are public functions and enums. I don't see any class
    module names. How do I expose them?
    >
    Thanks.
    >
    Matthew Wells
    Matthew.Wells@F irstByte.net
    >
    >
    >
    >

    Comment

    • Marshall Barton

      #3
      Re: mdb as reference problem...

      Matthew Wells wrote:
      >I have an mdb with class modules that I use as a reference for another mdb.
      >The library is called MyLib.
      >
      >I'm trying to declare variables in my front end mdb as class objects in the
      >library
      >
      >Dim x as MyLib.ClassModu leName
      >
      >This doesn't seem to work. When I type MyLib. and the intellisense pops up,
      >all I see are public functions and enums. I don't see any class module
      >names. How do I expose them?

      Take a look at:


      --
      Marsh

      Comment

      • Matthew Wells

        #4
        Re: mdb as reference problem...

        This works great - with a few notes.

        You don't have to rename the old class and create a new one. You can just
        delete the code and import the text file.

        When you import the text file, these lines will appear at the top. Just
        delete them (unless someone knows something I don't).

        VERSION 1.0 CLASS
        BEGIN
        MultiUse = -1 'True
        End

        Also, if you have any private classes that are used as parameters in the new
        public class (paramaters and other stuff - you'll see in the error message),
        you have to expose those classes as well.

        But overall this is really GREAT!!

        THANKS!!!




        "Marshall Barton" <marshbarton@wo wway.comwrote in message
        news:nsqa93t4a9 grqumssj0tqiudj 58ebr76o9@4ax.c om...
        Matthew Wells wrote:
        >
        >>I have an mdb with class modules that I use as a reference for another
        >>mdb.
        >>The library is called MyLib.
        >>
        >>I'm trying to declare variables in my front end mdb as class objects in
        >>the
        >>library
        >>
        >>Dim x as MyLib.ClassModu leName
        >>
        >>This doesn't seem to work. When I type MyLib. and the intellisense pops
        >>up,
        >>all I see are public functions and enums. I don't see any class module
        >>names. How do I expose them?
        >
        >
        Take a look at:

        >
        --
        Marsh

        Comment

        Working...