Benjamin1986
Board Regular
- Joined
- May 18, 2007
- Messages
- 60
Everyone,
I am attempting to use VBA to open an ASP file from my company's intranet, and I'm running into a problem.
The problem is that the last line quoted is failing. It's just giving an "Error 52 Bad File Name or Number" message. The file opens properly in Notepad, so I know that the file name is correct. This is problematic since there's no other way for me to get this data.
Ideas?
I am attempting to use VBA to open an ASP file from my company's intranet, and I'm running into a problem.
Code:
dim FileSys as Object, DataFile as Object
Dim FileName as string
dim ReadLine as string
set FileSys = CreateObject("Scripting.FileSystemObject")
Filename = "http://intranet/ViewThisItem.asp?ID=12345"
set Datafile = FileSys.opentextfile(FileName)
Ideas?