| View previous topic :: View next topic |
| Author |
Message |
Hack-Addict Master Cheater
Reputation: 0
Joined: 20 Nov 2007 Posts: 287
|
Posted: Thu Aug 21, 2008 11:09 pm Post subject: VB question how to load paths? |
|
|
Hey, how would I make it, so when it opens, it doesn't open a file or anything, it just loads the path into the text field?
Like for example:
| Code: | On Error GoTo ErrorHandler
Dim Contentfile
Me.CommonDialog1.Filter = "Coded bat (*.bat)|*.bat"
CommonDialog1.ShowOpen
Open CommonDialog1.FileName For Input As #2
Input #2, Contentfile
Text1.Text = Contentfile
& _
vbCrLf + "for this inconvenience."
Close #2
ErrorHandler:
Select Case Err.Number
Case Else
MsgBox "You dident load"
End Select |
How would I turn that into a code that loads the path and not the file?
_________________
|
|
| Back to top |
|
 |
EvilHottness Advanced Cheater
Reputation: 0
Joined: 29 Apr 2008 Posts: 64 Location: Co
|
Posted: Thu Aug 21, 2008 11:13 pm Post subject: |
|
|
Take out the
Open CommonDialog1.FileName For Input As #2
Input #2, Contentfile
Text1.Text = Contentfile
and just put Text1.text = commondialog1.filename
_________________
|
|
| Back to top |
|
 |
Hack-Addict Master Cheater
Reputation: 0
Joined: 20 Nov 2007 Posts: 287
|
Posted: Thu Aug 21, 2008 11:53 pm Post subject: |
|
|
| EvilHottness wrote: | Take out the
Open CommonDialog1.FileName For Input As #2
Input #2, Contentfile
Text1.Text = Contentfile
and just put Text1.text = commondialog1.filename |
Thanks man, thats exactly what I needed. Now can you tell me how to make it so it can load any type of file path? It won't let it load the path of an exe or an ini unless I tell it to, can you tell me the code for a load all files? Thanks. I love learning this stuff.
_________________
|
|
| Back to top |
|
 |
EvilHottness Advanced Cheater
Reputation: 0
Joined: 29 Apr 2008 Posts: 64 Location: Co
|
Posted: Fri Aug 22, 2008 12:12 am Post subject: |
|
|
Me[DOT]CommonDialog1[DOT]Filter = "All Files (*[DOT]*)|*[DOT]*"
Replace [DOT] with . of course it says im not allowed to post urls how gey an its not evena url!
_________________
|
|
| Back to top |
|
 |
Hack-Addict Master Cheater
Reputation: 0
Joined: 20 Nov 2007 Posts: 287
|
Posted: Fri Aug 22, 2008 12:23 am Post subject: |
|
|
| EvilHottness wrote: | Me[DOT]CommonDialog1[DOT]Filter = "All Files (*[DOT]*)|*[DOT]*"
Replace [DOT] with . of course it says im not allowed to post urls how gey an its not evena url! |
Wtf? Lol thats sucks, I think you gotta put it in a "[c0de]" box.
Thanks man,.
_________________
|
|
| Back to top |
|
 |
|