Posted on 25 January 2010
Today's guest post is authored by Daniel Ferry, a longtime professional Excel developer and consultant (and a newbie blogger). A few months ago, I wrote a post on how one can
simulate multithreading in VBA using Excel. Daniel picked up a thread from there and commented that he had some good success in marshalling some of windows multithreaded subsystems from within VBA. In this article he describes his approach.Multithreading VBA - Using VBScriptTry as we might to work around ...
Continue ReadingPosted on 01 January 2010
The IF function in VBA is one of the most frequently used of all statements. The IF function checks if the specified condition is being met or not. The IF function in VBA works in a slightly different manner from how it works in Excel. In Excel, the IF function does two things : It checks whether the given condition evaluates to TRUE or FALSE and then returns a value to use based on the evaluation i.e IF(condition, return_value_if_condition_true, ...
Continue ReadingPosted on 24 December 2009
Its been a few days since I posted. In case you were wondering what I was up to - yours truly was busy coding a program to create treemaps in Excel. Treemaps are interesting creatures. You can pack a few thousand data points in a single treemap and utilize just about the same space as any of the traditional charts. The term 'treemap', as we see it being used nowadays, actually refers to the inward growing members of the treemap ...
Continue ReadingPosted on 20 December 2009
The VBA Select Case Statement is an important construct in the VBA language. The Select Case statement in VBA allows the program to execute one set of statements out of many based on what a given expressions evaluates to. In today's post we will look at some basic and intermediate ways in which it can be used when writing VBA code.Basic Form of the VBA Select Case Statement[cc lang="vb"]
Select Case expression_to_test
Case expression_value_1 : Code to Execute When expression_to_test = expression_value_1
Case ...
Continue ReadingPosted on 16 December 2009
In
Six Sigma Control charts using Excel we saw how to make
control charts using named ranges. From there on, it was a short hop to porting the logic to VBA. So here is the VBA code for automating the creation of a six sigma control charts. It has been tested with Excel 2000, Excel 2007 and Excel 2010.
How to Use the Control Chart Program
1. Simply click the 'Make Control ...
Continue ReadingPosted on 23 November 2009
Here is some VBA code that can help you automate working with a
slicer in Excel. Slicers, as you would know, are the latest introduction to Excel. As I mentioned in my previous post, they can also be programattically controlled using simple VBA code. Let's see how.Slicer Creation using VBA - Basic Steps
Let's look at the slicer hierarchy - a workbook has slicer caches (accessed the SlicerCaches object), each slicer cache in turn having multiple slicers (one for each ...
Continue Reading