Roderick_E
Well-known Member
- Joined
- Oct 13, 2007
- Messages
- 2,051
I'm trying to use this example http://www.vbaexpress.com/kb/getarticle.php?kb_id=977 but get a Run-time error '75' Path/File access error on this line of the subroutine:
It seems to create the YourPage pdf and txt file ok.
Code:
Sub ReadTextFile()
Dim FileNum As Integer
Dim r As Integer
Dim wb As Workbook
Dim Data As String
r = 1
FileNum = FreeFile
Set wb = Workbooks.Add
[COLOR=#ff0000][B] Open PageName For Input As [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FileNum]#FileNum[/URL] [/B][/COLOR]
Do While Not EOF(FileNum)
Line Input [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FileNum]#FileNum[/URL] , Data
ActiveSheet.Cells(r, 1) = Data
r = r + 1
Loop
Close [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FileNum]#FileNum[/URL]
End Sub
It seems to create the YourPage pdf and txt file ok.