You are viewing our Forum Archives. To view or take place in current topics click here.
Need Help!!! (Programming)
Posted:
Need Help!!! (Programming)Posted:
Status: Offline
Joined: Feb 03, 201212Year Member
Posts: 24
Reputation Power: 0
I am making a program in visual basic that requires the person using to open a file somewhere on their computer, i need a code that will them to pick which file they want to open from wherever it may be, on their computer. I know i'm in the wrong section but the right section is kinda dull.
#2. Posted:
Status: Offline
Joined: Jan 01, 201113Year Member
Posts: 1,957
Reputation Power: 401
Status: Offline
Joined: Jan 01, 201113Year Member
Posts: 1,957
Reputation Power: 401
Swiftzy wrote I am making a program in visual basic that requires the person using to open a file somewhere on their computer, i need a code that will them to pick which file they want to open from wherever it may be, on their computer. I know i'm in the wrong section but the right section is kinda dull.
You need a FileDialog box on your Form.
Here is a link to Microsoft's page on the FileDialog object there is an example on how to use it at the bottom.
[ Register or Signin to view external links. ]
- 0useful
- 0not useful
#3. Posted:
Status: Offline
Joined: Aug 03, 201113Year Member
Posts: 45
Reputation Power: 1
Status: Offline
Joined: Aug 03, 201113Year Member
Posts: 45
Reputation Power: 1
Code the open button like this:
Dim filepath As String
Dim OFD As New OpenFileDialog(OFD.Filename)
OFD.ShowDialog()
OFD.Title = "Open a File"
Filepath = OFD.Filename
Readfile()
Public class readfile()
Your reader goes here
Dim filepath As String
Dim OFD As New OpenFileDialog(OFD.Filename)
OFD.ShowDialog()
OFD.Title = "Open a File"
Filepath = OFD.Filename
Readfile()
Public class readfile()
Your reader goes here
- 0useful
- 0not useful
You are viewing our Forum Archives. To view or take place in current topics click here.