Steve listens and quickly understands requirements. He delivers a superior product on time, on budget and beyond the ask. I definitely recommend Steve's work!
Monday, 05 September 2011 00:00 Last Updated on Tuesday, 06 September 2011 03:33
In a previous article I wrote about creating a buffer class in C# to access cells in a worksheet. The theory behind it was that accessing Excel one cell at a time is slow while doing it in batches is significantly faster. The same theory applies to all languages that you can program Excel in so in this article I present a class for VBA projects that does the same thing.
I use a class because this way the buffer and location of the buffer are held in member variables so you could use multiple buffer objects without any problems. The only major limitations for this class are:
ExcelBufferClass has the following public methods:
In order for the buffer to improve performance you must access cells from top to bottom, one column at a time. If you need a different access pattern you’ll have to make adjustments.
Download the Excel workbook with ExcelBufferClass and some example code for Excel 2007/2010 here.