Results 1 to 3 of 3

Thread: Class for saving/loading UDTs (User defined types)

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2021
    Posts
    9

    Class for saving/loading UDTs (User defined types)

    I made Class that has Save/Load functions for UDT arrays. And Get/Let Properties with the same name(s) as the user-type...
    I made it as copy/paste-able as possible, for adding/removing user-types to class code.



    With VBA you can programmatically create code. So I made a Class that automatically creates the UDT SAVE/LOAD Class with functions for all the custom user-types. That way you don't have to manually edit UDT-SAVE/LOAD Class every time you add or remove a user-type.


    Attached is the code.

    • makeUDTtool.cls : Class for creating UDT save/load class
    • Module_demo_4_UDTtool.bas : routines for creating and using UDT save/load class
    • new1_UDTTools.cls : for reference, should not need to import
    • new2_UDTTools.cls : for reference, should not need to import



    1. Import the makeUDTTool class
    2. Import the Module_demo_4_UDTtool module
    3. Run the udtTool_maker_demo routine
      newX_UDTTools Class(s) should be created
    4. Run the udtTool_SaveLoad_demo routine
      Shows how the newly created new2_UDTTools Class is used.
    Attached Files Attached Files

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    36,735

    Re: Class for saving/loading UDTs (User defined types)

    That should be a CodeBank post....except that it looks like we don't have a CodeBank for Office specifically, and there doesn't look to be any other obvious CodeBank place to put it.
    My usual boring signature: Nothing

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2021
    Posts
    9

    Re: Class for saving/loading UDTs (User defined types)

    I got more universal Excel-VBA code.

    A Calendar tool, so you don't have to use Active-X
    A library of String tools.

Tags for this Thread

Posting Permissions

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



Click Here to Expand Forum to Full Width