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


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

Please click below to support us on Facebook!