okay, i no the code for reading or writing to files on a:\, but im not sure how u do it for any files of c:\. i mean... how do u chose what files to write/read to @ run time?? it would be really great if some1 could help
thanks
burn
Printable View
okay, i no the code for reading or writing to files on a:\, but im not sure how u do it for any files of c:\. i mean... how do u chose what files to write/read to @ run time?? it would be really great if some1 could help
thanks
burn
Just set you filepath and it will does for you.
Code:Open "C:\Test.log" For Input As #1
'Do what ever you like here.
Close #1
ja i no, but is it possible to chose the file path at run time???
Sure you can... just do it like below.
Code:Private Sub Form_Load()
Dim MyFile As String
MyFile = InputBox ("Please Enter The FileName.","Select File","")
If MyFile <> "" then OpenFile(MyFile)
End Sub
Private Sub OpenFile (lpFileName As String)
Open lpFileName For Input As #1
'Do what ever you like here.
Close #1
End sub