p2p.wrox.com Forums

Need to download code?

View our list of code downloads.

  Return to Index  

vb_howto thread: App.Path

Message #1 by "Rick Dunmire" <dunnies@p...> on Sat, 19 May 2001 14:38:06
in order to open a file you can use open statement. like 

dim inFileNum as Integer
dim strLine as String

inFileNum = FreeFile
'open testfile.txt in read mode
Open "TESTFILE.TXT" For Input As #inFileNum 
Line Input #inFileNum, strLine
'print the content of first line from the first line.
Debug.print strLine
' Close before reopening in another mode.
Close #inFileNum 

for more detail check msdn for open statement.

hope this helps you...
> Hello
> I'm writing an electronic manual program and i use the [Dim db As 
> Set db = OpenDatabase(App.Path & "\DataBaseName.mdb")]
> but can it be used to retreive a FileName [Dim fn As FileName Set fn = 
> OpenTextFile(App.Path & "\txtFileName.txt"] or something like that?
> this is my first time working with txtFiles so any help is greatly needed
> Thanks everyone
> Rick

  Return to Index