I have shared some code I was working on in the past previously. I have since modified it a bit further as I learned more about excel (both 2007 and 2003) and also about my financial data reporting needs. I’ve taken to calling it Newton Utilities as, like Newtonian physics, the functions included are not [...]
usggovi dataAn extremely common problem encountered in VBScripting is having to copy to and from the Clipboard. VBScript does not offer direct access so there are many workarounds suggested. Most of what I find on the net are half-solutions involving security warnings from everybody’s favorite browser. This is my stackoverflow.com solution to the problem. Code [...]
One of the biggest philosophical realizations for me this year was finding out what I agree with politically. (It feels like a longer, stretched-out version of Schwarzenegger’s political epiphany.) Political Philosophy* is to me a very ill-defined field. I tend to take its meaning in a more general sense: it covers everything normative about our [...]
Also self explanatory? Private Sub swyxVBAPivotTable(inputarray(), rowlabelsBase1(), valuedataBase1(), outputarray()) Dim x, y, i, j, sb, WIA Dim prelimarray(), listofcols() x = UBound(rowlabelsBase1) y = UBound(valuedataBase1) ReDim prelimarray(1 To x + y, 1 To 1) ReDim listofcols(1 To 1) ‘just the first one, special treatment sb = “” For j = 1 To x [...]
This does what it says: Private Sub swyxSort2DArrayForTopX(inputarray(), outputarray(), sortcolnum As Integer, Optional TopX As Integer = 10, Optional AbsValue As Boolean = True) Dim sortindex() ReDim sortindex(1 To TopX) Dim sortedcol() ReDim sortedcol(1 To TopX) ‘first one sortedcol(1) = inputarray(LBound(inputarray), sortcolnum) sortindex(1) = LBound(inputarray) Dim j, [...]

.