Category Archives: VBA

RangeCells_Sample6_After

What is VBA Range.Cells and How Do You Use It?

This property can be used to select a Range. It returns a Range object that represents the cells. It refers to the cells of the specified range object, which can be a worksheet or a range of cells. It requires two parameter values “RowIndex” and

Access Word Objects through Excel VBA

In this article, we will see how to access the various word objects using VBA in Excel and insert data from Excel to Word. This has many practical applications such as when you have to fill out a form multiple times with data from Excel or

Excel data for PowerPoint

Accessing PowerPoint controls through Excel VBA

Creating a PowerPoint presentation using data from Excel is very common. You can simply create a new PowerPoint, copy all the data, and you’re done. But consider a periodic report — a sales report, for example. Each month you need to create a PPT with data in

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

Change Presentation ColorScheme(VBA for PowerPoint)

In this article I will explain how you can change the color scheme of a presentation using VBA for PowerPoint. Basically each presentation has one or more slidemasters. Slides that come after each slidemaster will inherit the properties of the slidemaster. By changing the theme

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