All posts by Melanie Jenkins

Using VBA Sum and VBA Sum Range

The Sum function in Excel is one of the most widely used functions, and in fact, probably one of the first functions that an Excel user learns when they are learning to use Excel!  Simply stated, the Sum function adds up a range of cells for

VBA vs. VB.Net — What’s the Difference?

VBA is the programming language behind Microsoft Office.  It is derived from a programming language called Basic. VB (Visual Basic) is also derived from Basic. For nearly all programming purposes, they are the same language. VB can either refer to straight Visual Basic (the last version

How Do You Fix an Automation Error in VBA?

One of the more frustrating errors to occur in VBA is the Automation Error.  It can often pop up for no apparent reason despite your code looking perfect. Reasons for This Error There are a variety of reasons that this can occur. Microsoft Office is

Using the VLookup Function in VBA

The VLookup function is an Excel function.  It can be used directly on your worksheet without having to use any VBA code.  However, there may be instances in VBA where you wish to also use VLookup functionality. You would then need to call the VLookup

The ReDim Statement in VBA

The ReDim statement is used to declare the size of a Dynamic array in VBA.  It can later be used to re-declare the size of the array as many times as you need.  It can only be used for Dynamic VBA Arrays (where the size

Using the UCase Function in Excel VBA

There may be a time in Excel that you need data that you are fetching from an Excel spreadsheet or importing from external data to be amended to upper case.  This can, of course, be done manually, but if it is a large amount of

On Error…Go To: Error Handling in VBA

Even when your code is perfectly constructed, the user might not always do what you would expect.  For this reason, you need to insert error handlers into your code whenever there might be a reason that an error might occur. Handling an error when incorrect

How to Use the VBA Replace Function

The VBA Replace function is a function which you can use in your code to replace one set of string characters with another set of string characters, or to replace a set of string characters with an empty string. For example, you may have a