I've got one idea - it's not a great one - and I'd say it would be a last resort.
You could use a "Web Query" in Excel (Data>Import External Data>New Web Query), and have set the properties of it to "refresh on file open", then link that to your Access DB.
When you need the data, have the file open then close itself first, so that it refreshes.
Like I said, not the best option, and probably a last resort.
Actually - make that a second last resort.
I'd say your last resort could be to shell out to FTP, download the file, which you link to it - such as, a link to "C:\file.txt", and before you have something that needs its data, run some code such as:
Function WriteFTP()
Dim strFTPFile As String, strOutputFile As String
strFTPFile = "C:\FTPCommands.txt"
strOutputFile = "file.txt"
Open strFTPFile For Output As #1
Print #1, "lcd c:\"
Print #1, "open yoursite.com"
Print #1, "username"
Print #1, "password"
Print #1, "cd whateverdirectory"
Print #1, "get " & strOutputFile & " " & strOutputFile
Print #1, "bye"
Close #1
Dim X, OpenForms
OpenForms = DoEvents
X = Shell("ftp.exe -s:C:\FTPCommands.txt", vbHide)
End Function
I'm hoping (for your sake) that someone else has some other ideas.
I am a loud man with a very large hat. This means I am in charge
|