Results 1 to 2 of 2

Help getting my head around classes

Threaded View

  1. #1
    Forum Contributor
    Join Date
    11-16-2011
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    405

    Help getting my head around classes

    Hi guys,

    Ive been programming in vba for a while now and the complexity of my macros have got to the stage where i require the use of classes.

    I'm new to the classes in general. I am after some assistance in understanding how to structure classes for my particular problem.

    I've attached a workbook to display the data that I am looking to implement classes on, and I would like your feedback as to whether I am approaching it from the right direction. From now on I will refer to the definitions from my Workbook file.

    All the text in Quotation marks are references to the attached workbook definitions i've provided.

    As you can see I have multiple "Cell Blocks" all of which contain various information. This info includes all the text from each of their 7 rows, the "Resource Name" they belong to, the "Resource Type" they belong to, the "Date", the "Day" etc.

    My understanding is that I should loop through my workbook, and add each of these "Cell Blocks" to a class (I will now refer to this class as clsCell_Block).

    My goal is to have all the data on the worksheet stored within classes as to allow me greater control over it. i.e. i plan to build some kind of user input GUI which allows the user to select the type of data that they wish to view. I imagine that my macro would basically go through all the elements in the class and return the ones that match the search criteria - whether it be the "Project Type", the "Resource Name", the "Date" etc etc then I would have to rebuild the worksheets according to the returned "Cell Blocks"


    If you could please provide some feedback as to whether you think my project is achievable, level of complexity etc.
    Perhaps a small example of how I could use classes for my particular situation would be greatly appreciated!

    Kind Regards
    Jordan
    Attached Files Attached Files
    Last edited by jordan2322; 02-14-2013 at 10:37 PM.

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