Starting from this post we have covered a range of areas relating to Excel VBA Macros. From the feedback received, it seems that people can see the benefits and uses of macros, but are still wary of them! As long as you record sections, breakdown code, comment it well, and have a search engine available […]
Continue readingDebugging VBA Errors When creating macros in VBA, even if you just record one and amend the code you are almost certain at some stage to come across an error. When you run the macro you get a dialog box with an error message, it’s not as helpful as my example above, but at least […]
Continue readingDuring the last few posts we have been building on our knowledge of Excel VBA Macros. This time we will use what we have already seen, but now we are going to work with more than one file. The Goal From this post, we will create a Billing file with a macro. This macro will […]
Continue readingIf you have been following the series of posts so far, you should have a file like the above. A macro has changed the text in the headers, changed the format of the header row, added a formula in column D and a total at the bottom of column D using variables. This series started […]
Continue readingMessage Boxes are easy to create and can be both informative and impressive to your program’s users. They appear as pop-up dialog boxes to your users and can give an update, information, warning, options, or other data. Similar to Message Boxes, are input boxes which allows the users to enter something to a dialog box, […]
Continue readingIn VBA Macros, Variables are used to temporarily store information. This piece of information can be retrieved by your code and used or changed and then reused. In a lot of cases, using variables instead of setting values can make your code snippets and macros more reusable across files. For example, in a quiz you […]
Continue readingIn Excel there is a formula called “Offset”. This returns the value of a cell that is a given number of rows and columns away from a cell that you referenced. The syntax is =OFFSET(Reference, Rows, Columns). Reference is the cell you are going to refer to, or start from Rows is a number, it is […]
Continue readingOne of the keyboard shortcuts that I use most often in Excel allows you to quickly move around big spreadsheets by jumping to the start, end, top or bottom of the table. It is also the basis for some of the most repeated VBA Macro code snippets that I use. There are 8 shortcuts […]
Continue readingThe Story So Far… If you have been following this string of posts, you will have created a macro which has so far changed headings in a file and also formatted them. This is a link to the last post. At the end of the last post I also asked you to make some […]
Continue readingThe Story So Far… In our last post (click here to read it) we created a macro called “mySecondMacro”. This changed the 4 headings on our file to this… … and our Macro was this… If you have been following these posts you will already have a file saved as above. Or you can […]
Continue readingThe Story So Far… Our series of posts on Excel VBA Macros began with these posts: Introduction Setting up Excel for VBA Recording your first Macro (and challenge question) Answer to challenge question Reading your first Macro If you have not already read them, I would suggest going through them now before continuing. The last […]
Continue readingThe Story So Far…. If you have been following these posts so far, you should have read Introduction Introduction 2 & Setting Up Excel For Macros Recording A Macro & Challenge Question Answer To Challenge Question You should have a file saved from the earlier posts where you recorded a macro and ran it using […]
Continue readingThe Challenge In the last post (click here) we recorded a macro. This macro took our basic report….. and automatically formatted the basic report to a layout that we needed….. However, when we added in an extra row and ran the macro, it didn’t give us what we might have expected….. Your challenge was […]
Continue readingThis post will give you more of an introduction to Excel VBA Macros and you will be recording your first macro. After recording the macro, we will then look at the code generated and start breaking it down, this will be the start of your adventures coding macros!! The Story So Far….. The following […]
Continue readingIf you spend a lot of time working with Office applications such as Excel, Word, PowerPoint, etc. there is a good chance that you do repetitive and monotonous tasks, probably without thinking about it or questioning it. Over the next few posts I will talk about Excel VBA Macros and the first examples will look […]
Continue reading