Archive for the ‘Arrays’ Category.
Hi everyone,
With all these Euler posts I thought, why not post my own?
Suppose the following:
I have a products table set up like this:
Code ProdName Price
0001 Product1 556.68
0002 Product2 977.41
0003 Product3 350.62
0004 Product4 509.16
0005 Product5 748.4
0006 Product6 802.96
(list goes on to as much as 5000 products)
And I want to show this table in a userform and give the user some filtering possibilities (lets say on the first two [...]
Here's a nice explanation of arrays
Arrays, What's the Point
On the Stackoverlow Podcast, Joel and Jeff agree that arrays are obsolete. There are far better data structures, most of which are built on arrays.
I still use arrays quite a bit. But considering I'm using an obsolete language (VBA = VB6), I guess that's not [...]
In a previous post, I demonstrated how to use constants to improve your code. Then everyone started beating up my loop. The code wasn't solving a real life problem, so I just threw any old loop together. It wasn't relevant because that's not what the post was about. To fight back, [...]
An AOL-user asks J-Walk:
An AOL User: What five letter word appears in the KJV only four times? It was made before Adam and named by Adam. Had no legs, arms or soul. Was given a soul and it was taken back.
Using J-Walk's Bible in Excel, I listed all of the five letter words that appear [...]
I need to save the names of one or more files in the custom document properties of a workbook. I don't want to create a separate property for every filename. I thought about saving a comma-delimited string, then parsing it out. It would look like:
file1name,file2name
Another idea I had was just save one [...]
I learned some things today. Apparently I've never used Application.Caller in a procedure called from a custom CommandBarButton. Or if I have, and have since forgot about it. As it turns out, Application.Caller returns a Variant array with two elements. The first element seems like it should be the index number [...]
OK, time for some non Excel 2007 stuff...
Recently someone asked me if it was possible to transpose a table of cells, but in such a way that the formula of each cell is kept intact. I decided VBA was the way to go and produced a small but very useful little routine for that.
What the [...]
I have an array of user defined types. The type has three elements and I need to sort on all three. Surprisingly, I've never had to sort an array of udt's before. Here's how I did it:
Type MyInfo
lType As Long
sName As String
dStart As Date
End Type
Sub Start()
[...]