Results 1 to 1 of 1

Count property not sequential and persistent data question

Threaded View

  1. #1
    Registered User
    Join Date
    02-16-2013
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    24

    Count property not sequential and persistent data question

    Two part question, if that's allowed. I have a macro named NewMarginPlacement that calls an InputBox series designed to capture seven variables, store those variables in an object called NMP (clsNMP), that is ultimately placed into a collection called NMPs (clsNMPs).

    My first question involves the Add to Collection Method. I'm running this code in the NewMarginPlacement Sub:

    NMPs.Add sFirstName, sLastName, sClientName, sPayRate, sBillRate, sEmployStatus, sSplitPercent
        'Adds NMP object variables into collection?
    But I feel like it should be written as:

    NMPs.Add cFirstName, cLastName, cClientName, cPayRate, cBillRate, cEmployStatus, cSplitPercent
        'Adds NMP object variables into collection?
    Instead I gives me a Compiler Error ByRef argument type mismatch. Can someone share some insight on how these variables are all working together?

    Secondly, these objects and collections reset everytime I run the macro. I'm creating this collection to persisently store these objects between user sessions and I would like them to be shared with other sheets by storing the collection class in a library (txt file?), where do I go from here?
    Attached Files Attached Files

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