Category Archives: File and Folder Dialog

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

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

VBA Folder Dialog

The folder dialog is a dialog that prompts the user to select a directory path. Jump To: Example Button Name, ButtonName Change Title, Title Start Path, InitialFileName You can download the file and code for this file here. Please note that although the sample file is for

No Thumbnail

VBA Excel, Writing to a Text File

In this article I will explain how you can write data to a text file. Jump To: Example 1, Write One Line of Data to Text File Example 2, Write Multiple Lines of Data to Text File Example 3, Save File Dialog Example 4, Check

No Thumbnail

Excel VBA, Reading Text Files

In this article I will explain how you can read data from a text file. You can download the workbook and code for this article here. Jump To: Example 1, Opening a Text File and Reading the First Line Example 2, Closing the Text File After Using

No Thumbnail

Excel VBA Save File Dialog, GetSaveAsFilename()

There may be times when you need to ask the user to select a location to save a file. This can be done using a save file dialog. Keep in mind that a save file dialogs doesn’t actually save anything. It only returns the full path

No Thumbnail

VBA Save File Dialog, FileDialog(msoFileDialogSaveAs)

There may be times when you need to ask the user to select a location to save a file. This can be done using the save file dialog. Keep in mind that the save file dialogs doesn’t actually save anything. It only returns the full

No Thumbnail

VBA Excel Working with Multiple Workbooks

If your data is saved on several different files then you are going to have to work with multiple workbooks. You can also download all the codes for this article here. Jump To: Creating Workbooks Opening Workbooks Saving Workbooks Saving Workbooks (Save As) Closing Workbooks

No Thumbnail

VBA Append Data to Text File

In this article I will explain how you can append data to a text file. I am assuming readers are familiar with modifying text files. If you are not familiar with modifying text files I’d recommend taking a look at the this article first VBA, Modify

No Thumbnail

Excel VBA, Text File to Columns

In this article I will explain how you can read the values in a text file and print them in columns in Excel. For example lets say we have the following data in a text file: We want to read the data from the text