Personal Library

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • OldBirdman
    Contributor
    • Mar 2007
    • 675

    Personal Library

    I have several functions I want to use in various projects. How do I maintain 1 copy in a standard location, but available to all projects?
  • ChipR
    Recognized Expert Top Contributor
    • Jul 2008
    • 1289

    #2
    I believe you can keep a code module in a db, then import it to any new project.

    Comment

    • ChipR
      Recognized Expert Top Contributor
      • Jul 2008
      • 1289

      #3
      Or did you mean you want to avoid having to import?

      Comment

      • FishVal
        Recognized Expert Specialist
        • Jun 2007
        • 2656

        #4
        Hello, OldBirdman.

        In the projects where those functions are desired to be available add a reference to that common mdb file.

        Tools > References > [Browse ...] button and choose an appropriate mdb.

        Regards,
        Fish.

        Comment

        • OldBirdman
          Contributor
          • Mar 2007
          • 675

          #5
          I tried this, and the Browse... eventually wanted a *.olb;*.tlb;*.d ll so didn't work. My functions might be
          Code:
          Public Function Max(varFirst as Variant, varSecond as Variant) as Variant
          If varFirst > varSecond then Max = varFirst else Max = varSecond
          End Function
          This is a simplified example, so don't expand on the idea, I know about ParamArray, etc.
          So I now have a project consisting of above function and similar ones. What next?

          Comment

          • FishVal
            Recognized Expert Specialist
            • Jun 2007
            • 2656

            #6
            :)

            "*.olb;*.tlb;*. dll" are not the only file types available from "File types" dropdown list.

            *.exe, *ocx, *.mdb, *.mde, *.mda, *.adp, *.ade and even *.* are available as well.

            Regards,
            Fish.

            Comment

            • OldBirdman
              Contributor
              • Mar 2007
              • 675

              #7
              Don't you ever sleep?
              Thankx, I got it working. I somehow have never had the list of extensions not be correct, so I overlooked that I could choose others.

              Comment

              • NeoPa
                Recognized Expert Moderator MVP
                • Oct 2006
                • 32654

                #8
                I've learned something new from this one :)

                I had no idea this was possible.

                Comment

                • Dan2kx
                  Contributor
                  • Oct 2007
                  • 365

                  #9
                  So if you make a DB full of functions and link in this way then you can just refer to them as norm!?

                  Is there any performance hit?

                  Dan

                  Comment

                  • OldBirdman
                    Contributor
                    • Mar 2007
                    • 675

                    #10
                    I'm not concerned about performance, as these are primary to handle user input, and most users can't type over about 250 characters/minute. Any code to handle user interface is probably not optimum. If one of these were going to be called by a query with 100K+ rows, yes, then this would be an issue. But then again, I would probably be writing the function to specifically address the EXACT problem, not a general function.

                    Comment

                    • puppydogbuddy
                      Recognized Expert Top Contributor
                      • May 2007
                      • 1923

                      #11
                      For anyone that is interested, here is a reference source:

                      Comment

                      • NeoPa
                        Recognized Expert Moderator MVP
                        • Oct 2006
                        • 32654

                        #12
                        Hey pDog, Any idea why I might not have the Code Librarian installed on my PC? I tried to follow the instructions (I have full Office 2003 Pro installed BTW).

                        Comment

                        • OldBirdman
                          Contributor
                          • Mar 2007
                          • 675

                          #13
                          Thanks puppydogbuddy, but that link, and subsequent ones from there lost me. I'll quit with post #6 as it does what I need.
                          We link tables all the time, and if there were a cost/efficiency issue with linking, it should have come up there.

                          Comment

                          • puppydogbuddy
                            Recognized Expert Top Contributor
                            • May 2007
                            • 1923

                            #14
                            Code Librarian

                            Originally posted by NeoPa
                            Hey pDog, Any idea why I might not have the Code Librarian installed on my PC? I tried to follow the instructions (I have full Office 2003 Pro installed BTW).
                            I believe the Code Librarian is included with the Office XP Developers Productivity ToolKit, which is a separate download. The problem is there so many downloads, I would have to check them all out. see this link:

                            Hier findest du umfangreiche Tipps und Schritt für Schritt Anleitungen für Microsoft Office 365, 2021, 2019, 2016, 2013, 2010, 2007, 2003, XP und 2000.

                            Comment

                            Working...