Is it possible either by macro or VBA to import an excel document that is on a FTP site. We have a report that is ran daily that is in Excel, I take the report and add the new information to a access table, then link the excel doc and run an update query to update all the records.
Currently I have a macro in place that pulls the report from my desktop and imports it and then adds it as a link table.
I have not actually used that specific database but I have used code like it.
Check to see if you need or do not have any required References. In the Visual Basic Editor window, go to Tools/References. If you see andy "Missing" references you many need to select the one that you have on your system to replace the one that is missing.
I downloaded and tested the database file from the link. It works exactly as expected when you get the parameters set correctly.
First, there is VBA code involved here. Are you familiar enought with VBA to try to work with it?
When you open that demo database locate the "frmUpDownTest" form. Open it in design mode.
Next, locate the Download button. Select it. Display the Properties dialog box for this control (press the F4 key). Select the "Event" tab. Place your cursor in the "On Click" event row. Click the button at the right end of that row (the one with the Three dots on it). The VBA window will be presented and your cursor will be in the On Click event of the "btnDownload" control.
It did work, I appreciate your help in all of this. I'm not sure if that will work for what I'm wanting to do, the file name changes daily and is a relatively long name (PANYNJ AE-CA Daily Opened Last 60 Days 2009-06-22.xls).
Basically what I would like to do is have the module executed by a macro that downloads the file to the desktop. This database will be used by maybe 3 people, never more than 1 person at the same time.
If you know the method by which the file is being named or any way to know the filename that you expect, then you can programmatically have the download function to look for that specific file.
If you know the method by which the file is being named or any way to know the filename that you expect, then you can programmatically have the download function to look for that specific file.
Using the same code that is in the On Click event of the Download button you can just use your current statement that creates the file name to assign that filename to a string type variable and then use that variable in place of the "Me.txtRemoteName" part of the code.