+ Reply to Thread
Results 1 to 4 of 4

Class Module vs. Arrays

  1. #1
    Trip
    Guest

    Class Module vs. Arrays

    Hello all,

    I have a quick VBA architectural question and any direction you may be
    able to provide would be greatly appreciated.

    I have created an Excel application which takes 3 real-time inputs (via
    DDE), has roughly 60 variables of different types and about 12 outputs,
    and about 2000 lines of code.

    I now want to change the application so that it will handle multiple
    sets of the 3 inputs simultaneously.

    How would you suggest changing the architecture? Move everything into
    a class and then instantiate an instance of the related object as
    needed? Or, create a large array which can handle multiple instances
    of each variable and loop through the array sequentially?

    Any thoughts would be great!

    Thanks,

    Trip


  2. #2
    Chip Pearson
    Guest

    Re: Class Module vs. Arrays

    I would go for a class module approach, storing each new instance
    of the class in a Collection object.


    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com


    "Trip" <[email protected]> wrote in message
    news:[email protected]...
    > Hello all,
    >
    > I have a quick VBA architectural question and any direction you
    > may be
    > able to provide would be greatly appreciated.
    >
    > I have created an Excel application which takes 3 real-time
    > inputs (via
    > DDE), has roughly 60 variables of different types and about 12
    > outputs,
    > and about 2000 lines of code.
    >
    > I now want to change the application so that it will handle
    > multiple
    > sets of the 3 inputs simultaneously.
    >
    > How would you suggest changing the architecture? Move
    > everything into
    > a class and then instantiate an instance of the related object
    > as
    > needed? Or, create a large array which can handle multiple
    > instances
    > of each variable and loop through the array sequentially?
    >
    > Any thoughts would be great!
    >
    > Thanks,
    >
    > Trip
    >




  3. #3
    Trip
    Guest

    Re: Class Module vs. Arrays

    Thank you Chip!

    Can you point me to any good examples of this being done? This would
    be a great help since I'm somewhat of a class/ood newbie.

    Thanks again!

    Trip


  4. #4
    Registered User
    Join Date
    08-11-2005
    Location
    Netherlands Waddinxveen
    Posts
    81
    set up a class wrapping a variant collection or better three collections
    as your input class

    create a parent class with a variant collection to add inputs in.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1