PDA

Click to See Complete Forum and Search --> : Opening a file


MPrestonf12
Nov 7th, 1999, 01:35 AM
DOes anyone know how to open a file when first you use commondialog control to open the open box and then select the file to be opened in a textbox. Thanks
Matt

Pyro13
Nov 7th, 1999, 02:09 AM
I don't know what you're talkin about but if you try

Shell "C:\Whateverpath\whateverfile.whatever"

It might work for whatever but if it doesn't then whatever. see ya.
:) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :( :) :(

------------------
[]D Y R o

ShadowCrawler
Nov 7th, 1999, 02:22 AM
Loads a text file into a textbox:

Dim tempstr As String
CommonDialog.Filename = ""
CommonDialog.ShowOpen

If CommonDialog.Filename <> "" Then
Open "text.txt" For Input As #1
Do While Not EOF(1)
Line Input #1, tempstr
TextBox.Text = Textbox.Text & vbCr & tempstr
Loop
Close
End If


------------------
(¯`·.¸¸.·´¯`·->ShadowCrawler<-·´¯`·.¸¸.·´¯)
Teenage Programmer
Visual Basic, HTML, C++, JavaScript
http://welcome.to/X12Tech
Email: craigkovatch@compuserve.com
ICQ#: 9872708 (http://wwp.mirabilis.com/9872708)