![]() |
excel and VB Open Dialog box
Hi guys,
I want to add an Open Dialog Box in an excel file, so the user can browse for a csv file and then add it as a worksheet in the original excel file. It's going to be like this: 1. The excel file (called main.xls) has 4 Open Dialog Boxes. 2. When the user clicks on the 'Browse' button beside the first dialog box, he can browse for a csv file. 3. Let's say he chose a csv file named file1.csv... this csv file will be saved in a worksheet of main.xls. How do I go about this? Please start with how I can create a Dialog Box. Thanks! |
Hi guys,
I want to add an Open File Dialog Box in an excel file, so the user can browse for a csv file and then add it as a worksheet in the original excel file. It's going to be like this: 1. The excel file (called main.xls) has 4 Open Dialog Boxes. 2. When the user clicks on the 'Browse' button beside the first dialog box, he can browse for a csv file. 3. Let's say he chose a csv file named file1.csv... this csv file will be saved in a worksheet of main.xls. How do I go about this? Please start with how I can create an Open File Dialog Box. Thanks! |
Sub test()
Dim F As Variant F = Application.GetOpenFilename("csv Files (*.csv), *.csv") If F = False Then Exit Sub Workbooks.Open F End Sub HTH. Best wishes Harald "Anakin Moonwalker" skrev i melding ... Hi guys, I want to add an Open Dialog Box in an excel file, so the user can browse for a csv file and then add it as a worksheet in the original excel file. It's going to be like this: 1. The excel file (called main.xls) has 4 Open Dialog Boxes. 2. When the user clicks on the 'Browse' button beside the first dialog box, he can browse for a csv file. 3. Let's say he chose a csv file named file1.csv... this csv file will be saved in a worksheet of main.xls. How do I go about this? Please start with how I can create a Dialog Box. Thanks! |
All times are GMT +1. The time now is 01:20 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com