Am New to VB 6
I want to select a file from the directory or other system. How to use open file dialog in VB 6?
Need VB 6 Code Help.
Am New to VB 6
I want to select a file from the directory or other system. How to use open file dialog in VB 6?
Need VB 6 Code Help.
Why don't you use MSDN or search on google for such a thing first?
If you are new, read some books/articles & get yourself acquainted.
If you don't find anything in help/MSDN/google, ask on SO.
There is Microsoft Common Dialogs Control that you can use to do that.
Press CTRL + T, you will see a number of activex controls, pick the microsoft common dialogs control.
Save time with VB6's Common Dialog control
And here is the search string I typed into google "file open dialog vb6" - first result.
There's some example code in this question. Quoting:
In VB6, add the component:
Now on your form, add the new Common Dialog control from the toolbox
In code, you need:
CommonDialog.Filter = "Apps (*.txt)|*.txt|All files (*.*)|*.*"
CommonDialog.DefaultExt = "txt"
CommonDialog.DialogTitle = "Select File"
CommonDialog.ShowOpen
'The FileName property gives you the variable you need to use
MsgBox CommonDialog.FileName