Visual Basic .NET Tutorial 23 -How To Use OpenFileDialog (FileName, Filter, Multiselect ..)

how to filter open file dialog in VB.Net
Populate Listbox From Multi-select OpenFileDialog
How To Use the OpenFileDialog Box in VB.NET
How to open a file using openfiledialog in
Let users pick a file to open via OpenFileDialog in VB.NET
FileDialog.Filter Property (Microsoft.Win32) – MSDN…/mic
Searches related to how to use openfiledialog filters
vb net openfiledialog filter image doc pdf text png jpg cpp exe
vb net openfiledialog filter excel


OneX_LuaDev says:

How about when doing it you like make it where you open a TXT file and the content gets displayed on the RichTextBox?

ahmed saleh says:

Copy/Past (save your time)

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
TextBox1.Text = OpenFileDialog1.FileName
End Sub

Csuhi says:

Where can I find OR sign near filter? What is its code?

Jason Somer says:


garyoptica says:

I am really grateful for Asian and far east programmers for making great videos explaining things clearly in English whilst others make videos that lead to no where
well done Sir and many thanks

Wina Widiana Fauziah says:

Hello! Do yiu have tutorial for save images from video and save it to selected folder using visual basic? Thankyou

Jeff Schultz says:

I noticed my .txt files weren’t working but my .pdf files showed up. So a quick check in the code and the space was the problem. So to anyone that can’t get this to work, make sure the code is …”TEXT BOX | *.txt| ….” the reason the .pdf worked was it was at the end of the string without a space (…. .pdf”)

Grayman says:

Thanks 😀

ProgrammingKnowledge says:
Tomas Lopez says:

Thanks a lot for this video. It was very helpful.

Angel Maldonado Diaz says:

Hi , can you publish or put a code how to insert a image in the database

Son Ly says:

thank you

othmane bouesga says:

You’re goood

Daniel W says:

I did find this video very helpful but when I ran my program and had:ListBox1.Text = (OpenFileDialog1.FileNames(x))It came up with an error saying: An unhandled exception to type ‘System.IndexOutOfRangeException’ occurred in filePath.exeAdditional information: Index was outside the bounds of the array.Please can I get shown where I went wrong. Thank YouP.S.. no matter what I use (message box, label, button, etc…) I get the same thing over and over again.

PSK says:

Guys if you get some Errors and cant open MULTIPLE FILES i got an CODE for you MSG if you need

Amit Bodhwani says:

I have a button called UpLoad on my webpage which ask to upload the .csv file.
I am able to click that button using VBA code and after clicking that button on webpage a popup appears similar to open dialog box which ask to upload a file for example say “Star.csv” but i want to insert the file name called “Star.csv” which is stored in my local directory automatically using VBA without user interaction.

Any help will be appreciated .

ahmeddzcom ahmed says:


Chris Read says:

HI  This is fine if one is using a forms based project but I’m trying to use an open file dialogue in a WebForms project and in a web form, the OpenFormDialogue doesn’t appear in the Toolbox…  Does this mean I can’t use this approach?

Beyrek Eliyev says:

of course

quarry 038 says:


Akshay Kedari says:

” For x = 0 To OpenFileDialog1.FileName.Count – 1″ this solution of puting -1 after Count isn’t working, does anyone know the solution?

Kignoumba jhavik bfern says:

nice tutorial

Nitrous says:

what is I only want the file name not the path

Lupus Sousa says:

how to save selected photo from openfiledialog to path i want.
need your help!

Poon Shotateerawasu says:


Write a comment


Human Verification: In order to verify that you are a human and not a spam bot, please enter the answer into the following box below based on the instructions contained in the graphic.

Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!

Send this to a friend

▷ Other ReviewsVehicles▷ Show Cars▷ Motorbikes▷ Scooters▷ Bicycles▷ Rims & Tires▷ Luxury BoatsFashion▷ Sunglasses▷ Luxury Watches▷ Luxury Purses▷ Jeans Wear▷ High Heels▷ Kinis Swimwear▷ Perfumes▷ Jewellery▷ Cosmetics▷ Shaving Helpers▷ Fashion HatsFooding▷ Chef Club▷ Fooding Helpers▷ Coktails & LiquorsSports▷ Sport Shoes▷ Fitness & Detox▷ Golf Gear▷ Racquets▷ Hiking & Trek Gear▷ Diving Equipment▷ Ski Gear▷ Snowboards▷ Surf Boards▷ Rollers & SkatesEntertainment▷ DIY Guides▷ Zik Instruments▷ Published Books▷ Music Albums▷ Cine Movies▷ Trading Helpers▷ Make Money▷ Fishing Equipment▷ Paintball Supplies▷ Trading Card Games▷ Telescopes▷ Knives▷ VapesHigh Tech▷ Flat Screens▷ Tech Devices▷ Camera Lenses▷ Audio HiFi▷ Printers▷ USB Devices▷ PC Hardware▷ Network Gear▷ Cloud Servers▷ Software Helpers▷ Programmer Helpers▷ Mobile Apps▷ Hearing AidsHome▷ Home Furniture▷ Home Appliances▷ Tools Workshop▷ Beddings▷ Floor Layings▷ Barbecues▷ Aquarium Gear▷ Safe Boxes▷ Office Supplies▷ Security Locks▷ Cleaning ProductsKids▷ Baby Strollers▷ Child Car Seats▷ Remote ControlledTravel▷ Luggages & Bags▷ Airlines Seats▷ Hotel Rooms▷ Fun Trips▷ Cruise Ships▷ Mexico Tours