Category: Excel

Variables in VBA (Dim)

Declaring and Using Variables in VBA

Variables can be a little tricky to get your head around at first.  They are an important concept and a good understanding of them leads to bug-free, easy to read and efficient code.  The length of this post reflects the importance of declaring and using variables sensibly in VBA. We will touch on the topic…
Read more

Option Explicit

Option Explicit

One of the easiest ways to improve your VBA code is to include Option Explicit as the first line of each module within a VBA Project. Using Option Explicit forces all variables to be declared in some manner before they can be used. This might not sound important now since most of your code will…
Read more

Excel WorkSheet to CSV

Save Excel WorkSheet as CSV

How to Save an Excel Worksheet as CSV file using VBA.