-
I’ve been following Dick’s VBHelpers Build series (1, 2, 3) and his last post reminded me that, from time to time, I need to sort a collection of items in-memory.
I don’t have to sort all that often, so my approach has changed over time. I’ve kind of settled on the following....
-
In this iteration, I Create a generator for a FillFromRange method of the parent class
Get rid of those unisightly blank lines when converting Public variables to Property statements
Change FindBy to ChildBy (thanks Steve J) If I have a range of records that I want to put in a class, which happens a...
-
Over the years, I have followed the “best practice” of always using a property get and let/set combination rather than just declaring a public variable. But, over the last few months I’ve started questioning this dictum.
Now, before people start jumping up and down, I am aware of the...
-
How was that video? Pretty super-awesome, huh?
You can download VBHelpers.zip
It’s rough, to say the least, but if you want to mess around with it, have at it. Here’s some more information on what was happening in that video:
0:00 First I insert a class module. Inserting modules is one of...
-
Happy Spreadsheet Day. This year, it’s something about helping students. I don’t care about students. They don’t have any money and they spend all their time on the Facebook and the Twitter.
Instead of helping students, I made a video about how I create custom class modules. If you...
-
I had some redundant code in my previous post that I’m going to fix up. First, this
Public Function IsAway(hRow As HTMLTableRow) As Boolean
Dim bReturn As Boolean
bReturn...
-
In College Football Statistics, I created my Team and Game objects, filled the Teams collection, and wrote a FindByName property for Teams. Now the fun part; filling the Game objects. This is a long one and I’m not going to sit here and tell you it doesn’t need some refactoring. But it [...
-
Who wants to talk about college football, class modules and XMLHttp requests? Anyone? Well, for the two of you left, here’s what I got. The problem with comparing team statistics, especially early in the season, is cupcakes. Cupcakes are teams that aren’t very good at football. Teams like...
-
This was motivated by a question in the mrexcel.com forum. The person asking for help had multiple comboboxes in a userform, each of which contained the same items, A through L for the purpose of this exercise. These items were sorted alphabetically. He wanted that when the user selected an item in ...
-
I had to do some pretty extensive filtering recently and employed disconnected recordsets to speed up the code, which it did. Except that I ran into a bug, or so I thought. When I made the ADODB.Recordset variable a private module level variable in the class, I got a run time error. [...] Read More....
-
Just when you thought the class module fun was over, it’s not. As long as I have all this class infrastructure, I can leverage that into making some reports. As you are no doubt aware, employees get pissed off when you make errors on their paychecks. Therefore, a review report prior to [...] Read...
-
In Part 1 we created some classes. In Part 2 we created some more classes, linked them, and filled them. Now we’re ready to actually produce some results. In a standard module, I write my code to generate the XML file.
Public Sub GenerateACH()
Set gshData = wshChecks...
-
In Part 1, I created the CEmployee and CPayrollItem classes and their parents. For CPayrollItem, I used ItemName as the property for the first column because I didn’t want to name it the same as the class name, PayrollItem. Next, I need to create the CCheck and CCheckItem classes.
For CCheckItem...
-
There is a product that some banks use, like my bank, called Premier ACH. It’s hosted on the bank’s website. It allows you to enter the data for an ACH transactions (Automated Clearing House, think direct deposit) and creates a properly formatted NACHA file for you. You can submit a NACHA...
-
I read VBA Has No Class over at Excel Do, Dynamic Does with interest. Bob says:
As you can see, the disconnected recordset can do everything a collection class can do, but without having to hand-roll any of the methods, recordset has them builtin.
I’m not ready to give up collection classes yet...