I have learnt the hard way over many years ways of speeding up VBA code. Mostly these lessons have come from necessity – the old “go and have a cup of coffee while it runs” comment doesn’t always endear your code to the customer. We have in the past written thousands of lines of code that sometimes takes minutes or even 10s of minutes to run.
Some of the quicker ways to speed things up are in turning off things in excel like calculation, screen updating and the like. Others involve using arrays in code to handle slabs of data and manipulate them in code before returning the results back to the spreadsheet. Others are little things like not selecting ranges etc before using them.
Chad Rothschiller has written a great article on Excel VBA Performance Coding Best Practices going through all these items and explaining how to optimise your code for efficiency. These are beginning tasks. There are certainly lot more complex ways to deal with some of these things but for anybody who started writing VBA by using the record macro function, as I did way back in the early 90’s these tips certainly allow you to speed up some of the very inefficient code that that method creates.
I have highlighted some of them here and added some additional notes.
My mother pointed me to an interesting article the other day, titled Keep the Fast, Keep the Feast by Peter Leithart who blogs at www.leithart.com.
Over the centuries, Christians have fasted for many reasons. Sometimes the reasons have been good. The apostles and their churches fasted and prayed before selecting elders or ordaining missionaries. Christians have fasted in mourning for their sins. They have fasted and prayed to combat demons and to plead with God for relief from disaster.
Often, of course, they have fasted for bad reasons. They fasted because they believed flesh was evil, because they felt desperately guilty and forgot God’s love in sending his Son to cleanse their sins, because they wanted God to notice how wonderfully pious they were.
In spite of errors and abuses, Christians in the past had sound intuitions about the centrality of fasting in the Christian life. In the early Church, fasting was not an isolated practice reserved for a day or a season. It was a clue to all Christian living, a perspective on the whole of discipleship. To be a Christian meant to participate in a great feast. It meant also to observe a great fast.
I was interested enough to read on and found some real gems.
Sometimes i get time to wait – whether its waiting for a code procedure to run, files to upload or staff to complete a task. Often its easier to wait then it is to star al alternate jhob. Sometimes I multitask but this depends on what the other task is also and whether it can be left easily to come back tot he main one. Often I write emails.
Today I am publishing some links to interesting information on the web while waiting for a staff member to debug his code that I am checking. (Thanks Nick!)
Amit writes two tutorials for IE8; one titled How to Write an IE8 Web Slice for WordPress Blogs and the other titled Turn your RSS Feed into a Web Slice for Internet Explorer 8
I followed the instructions and have set up a webslice for SpyJournal. You can do the same.
My friend John’s dad passed away today. John has written some memories and tributes.
Joe has posted a review of the Samsung Instinct phone – looks very nice.
Check this video out. The Geeks are Sexy site has linked a video from [H] showing a .50 cal Amour Piercing Incendiary being shot at 18 hard drives. The bullet sticks in the 17th drive.
Google chrome is the least likely browser to be hacked. I am going to switch out from Firefox on all the kids PCS straight away. I have been using Chrome since it was released and love it.
Australian TV viewers using ICETV EPG this is an important notice regarding the new Digital Channel ONE HD.
Ada Lovelace Day is an international day of blogging to draw attention to women excelling in technology.
Women’s contributions often go unacknowledged, their innovations seldom mentioned, their faces rarely recognised. We want you to tell the world about these unsung heroines. Entrepreneurs, innovators, sysadmins, programmers, designers, games developers, hardware experts, tech journalists, tech consultants. The list of tech-related careers is endless.
The Finding Ada blog set up a pledge process to find 1,000 people to publish articles on women who have excelled in IT and are role models for other women in the industry and for those thinking of starting careers in IT.
Recent comments
10 years 37 weeks ago
10 years 37 weeks ago
10 years 39 weeks ago
10 years 39 weeks ago
10 years 39 weeks ago
10 years 39 weeks ago
10 years 39 weeks ago
10 years 39 weeks ago
10 years 39 weeks ago
10 years 39 weeks ago