Category Archives: VBA For Excel

option explicit is automatically filled in

Everything About Option Explicit in VBA

As a developer, it is a good practice to declare your variables in a script/code so that you immediately get the source of an error when running it. Option Explicit is used in VBA precisely to make the defining of variables mandatory while writing code.

convert table dialog box

How to Convert a Word or Excel Table to Text

The Table object in Excel and Word is underutilized by most users and developers of Excel and Word, in my not-so-humble opinion. For example, an Excel Table object with formulas calculates faster and takes less storage space than does the comparable normal range. As useful

How to use the OnKey method in Excel VBA

As a VBA developer you sometimes need to use a key or a combination of keys to run a procedure without using the command button on a UserForm. This is possible with the VBA onkey method. Syntax The syntax for the OnKey method is: Application.OnKey

How to delete columns in Excel using VBA

In this article we will see how to delete columns in Excel using VBA. Example 1: Delete an entire column in a sheet using column number: Say, the Excel data that is of the form below and you need to delete the column for May-18