Problem trying to remove BAS module after running a procedure within it

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nates
    New Member
    • Apr 2008
    • 16

    #16
    I have managed to delete a BAS then import a new version and then run the sub within the loaded BAS without any trouble. The problem arrives when I try to remove this BAS to load a new one.

    The database is a motor insurance quote engine which will need to load one of several hundred BAS files at runtime dependant on the effective month / years rates selected by the user. I have attached a number of screenshots to try to better highlight this. It seems the first time a BAS is removed and a new one loaded everything works fine, however, each subsequant BAS seems to cease any classes that are active (they will appear to be set back to Nothing).

    We are limited on space hence why we are not using multiple MDB files to act as code containers.

    EDIT: Have uploaded a ZIP with the full size screenshots.

    Thanks for all your help so far guys :)
    Attached Files

    Comment

    • FishVal
      Recognized Expert Specialist
      • Jun 2007
      • 2656

      #17
      Hello, Nates.
      • Did you try indirect call using Application.Run method.
      • What is so different and unpredictable in those calculations that you have to write a separate VBA code for each?

      Comment

      • Nates
        New Member
        • Apr 2008
        • 16

        #18
        Originally posted by FishVal
        Hello, Nates.
        • Did you try indirect call using Application.Run method.
        • What is so different and unpredictable in those calculations that you have to write a separate VBA code for each?
        I've not tried to indirectly call, will give that a go now.

        The code generates an insurance premium. Although the same table of risk information is used to generate a premium i.e. they all use Driver's Sex, Age, Vehicle, Cover etc they behave differently when generating underwriting terms based on this information (be it differing excesses, endorsements, premium breakdowns). Some of the product BAS files require little over 200 lines of code to achieve the final premium, others are closer to 2000.

        Comment

        • ADezii
          Recognized Expert Expert
          • Apr 2006
          • 8834

          #19
          Originally posted by Nates
          I've not tried to indirectly call, will give that a go now.

          The code generates an insurance premium. Although the same table of risk information is used to generate a premium i.e. they all use Driver's Sex, Age, Vehicle, Cover etc they behave differently when generating underwriting terms based on this information (be it differing excesses, endorsements, premium breakdowns). Some of the product BAS files require little over 200 lines of code to achieve the final premium, others are closer to 2000.
          Any possibility of Uploading a Mini-Version of your DB with only a few Modules, and only the minimal and essential code that is failing? You need only to include the relevant code along with any other specifics. The data itself is also irrelevant, can even be dummy, and need only parallel the actual data in the DB.

          Comment

          • Nates
            New Member
            • Apr 2008
            • 16

            #20
            Will see if I can get something uploaded today.

            Thanks for continuing to offer assistance, really appreciated.

            Comment

            • ADezii
              Recognized Expert Expert
              • Apr 2006
              • 8834

              #21
              Originally posted by Nates
              Will see if I can get something uploaded today.

              Thanks for continuing to offer assistance, really appreciated.
              If the size of the Attachment is too large for the System to accept, let me know, and you can send it to my personal E-Mail Account which I will give you in a Private Message.

              Comment

              Working...