hgus393
Registered User.
- Local time
- Today, 10:31
- Joined
- Jan 27, 2009
- Messages
- 83
Hi all,
This is my first post in this forum. I am a avid excel user but I am realizing the power of access. I have tried to find a thread that matches what I am looking for but to no avail. Basically what I am trying to do is to import several text files, via vba, that have headers and lines in the beginning. I have looked at some previous code example and found the following:
I not sure if I have to use any code tags so please excuse my ignorance..
Sub help()
Dim s As String
Dim rs As Recordset
Dim path As String
Set rs = CurrentDb.OpenRecordset("FxRates")
path = "C:temp\file.txt"
Close #1
Open path For Input Lock Read As #1
Do While Not EOF(1)
Line Input #1, s
rs.AddNew
rs!Currency = Mid(s, 1, 3)
rs!CurrencyRates = CDbl(Mid(s, 4, 9))
rs.Update
Loop
Close #1
End sub
How can I force the macro to start on say line 8 instead of beginning on line 1?
Thankful for any help!
Cheers
Robert
This is my first post in this forum. I am a avid excel user but I am realizing the power of access. I have tried to find a thread that matches what I am looking for but to no avail. Basically what I am trying to do is to import several text files, via vba, that have headers and lines in the beginning. I have looked at some previous code example and found the following:
I not sure if I have to use any code tags so please excuse my ignorance..
Sub help()
Dim s As String
Dim rs As Recordset
Dim path As String
Set rs = CurrentDb.OpenRecordset("FxRates")
path = "C:temp\file.txt"
Close #1
Open path For Input Lock Read As #1
Do While Not EOF(1)
Line Input #1, s
rs.AddNew
rs!Currency = Mid(s, 1, 3)
rs!CurrencyRates = CDbl(Mid(s, 4, 9))
rs.Update
Loop
Close #1
End sub
How can I force the macro to start on say line 8 instead of beginning on line 1?
Thankful for any help!
Cheers
Robert