Category Archives: Excel

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