Category Archives: Excel

The GetOpenFilename Command in VBA

How often in your VBA code do you have ask for a file name along with its complete path as an input from the user? Most programmers end up using an input box in this situation. However, this is not very convenient for the user. Furthermore, there are

Using Application.Filedialog in Microsoft Excel VBA

What is the Application.FileDialog VBA function and how do you use it? Basically, it returns a FileDialog object instance of the dialog. This is similar to the functionality of the standard Open and Save dialog boxes found in Microsoft Office applications. Using these dialog boxes, users

The Excel VBA Application.FileDialog Object

Have you ever wished you could develop a simple way for users to select files to open from within Excel? Perhaps you want to impose a level of control over which file path users select the file(s) from. This can be done by using the

No Thumbnail

VBA, Modify Existing Text File

In this article I will explain how you can modify an existing text file. Jump To: Example 1, Overwrite Existing File With New Data Example 2, Modify Values in Text File Example 3, Adding Open and Save File Dialogs You can download the file and code related

No Thumbnail

Excel VBA, Arrays and Ranges

When modifying worksheets and ranges,  one option would be to modify the worksheet directly using the commands I’v explained in the article Referencing Ranges In Excel Using VBA but that would be very inefficient. Every time you read or write something to an excel sheet, you will be consuming considerable

No Thumbnail

Excel VBA, Font Strikethrough

In this article I will explain how you can use VBA to add strikethrough to the font of cells and ranges. I’ve also provided a sample code which checks if a cell has the strikethrough font or not. You can download the file and code