Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
access to a server via a macro
I manually upload a results sheet to a server - I want to be able to do this
via a macro. 1. Save a particular page as a web page with a pop up for the sheet name 2. Open the FTP server programme and log on using a user name and password 3. Select upload, within the FTP programme, of the file created in '2' 4. Close the ftp programme Can this be done? Thanks in anticipation |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
access to a server via a macro
in the IDE, set a Reference to the 'Microsoft Internet Transfer Control 6.0'
control ( usually C:\Windows\System32\msinet.ocx) having saved the fille first , now you can send it... Public Sub FTPtheFile(sFileName As String) Dim oFTP As FFTPController sFileName = sRNG_TPFILE Set oFTP = New FFTPController With oFTP .URL = sFTP_URL .Login = sFTP_USER .Password = sFTP_PWD .SourceFile = sFileName .TargetPath = sFTP_PATH .Show vbModal If .FileSent Then MsgBox "Sent at " & Now() End If End With Unload oFTP End Sub "Gwyndalf" wrote: I manually upload a results sheet to a server - I want to be able to do this via a macro. 1. Save a particular page as a web page with a pop up for the sheet name 2. Open the FTP server programme and log on using a user name and password 3. Select upload, within the FTP programme, of the file created in '2' 4. Close the ftp programme Can this be done? Thanks in anticipation |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
access to a server via a macro
as i copied the code from one of my own code modules, i obviously left some
rubbish in...now its fixed. sorry "Patrick Molloy" wrote: in the IDE, set a Reference to the 'Microsoft Internet Transfer Control 6.0' control ( usually C:\Windows\System32\msinet.ocx) having saved the file first , now you can send it... Public Sub FTPtheFile(sFileName As String) Dim oFTP As FFTPController Set oFTP = New FFTPController With oFTP .URL = sFTP_URL .Login = sFTP_USER .Password = sFTP_PWD .SourceFile = sFileName .TargetPath = sFTP_PATH .Show vbModal If .FileSent Then MsgBox "Sent at " & Now() End If End With Unload oFTP End Sub "Gwyndalf" wrote: I manually upload a results sheet to a server - I want to be able to do this via a macro. 1. Save a particular page as a web page with a pop up for the sheet name 2. Open the FTP server programme and log on using a user name and password 3. Select upload, within the FTP programme, of the file created in '2' 4. Close the ftp programme Can this be done? Thanks in anticipation |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
access to a server via a macro
Patrick
Many thanks for your replly; hadn't realised any replies had returned - hence delay in response. Can you explain the 'IDE' area where I should reference msinet.ocx? I usually use a 3rd party FTP uploader (FTP Surfer [Whisper technologies]) was unaware that MS had one built in. (Which is what I assume your code is using) My current programme produces the HTML file with a filename based on the date from a cell within a spreadsheet ie apr24.htm. and saves it in my documents. Your first line is Sub FTPthe File(sFileName As String) - will this be requesting the user to input the filename? Since my programme already knows what the name will be can I not use that information already to simply upload that file from the saved destination address? Very grateful for your assistance "Patrick Molloy" wrote: as i copied the code from one of my own code modules, i obviously left some rubbish in...now its fixed. sorry "Patrick Molloy" wrote: in the IDE, set a Reference to the 'Microsoft Internet Transfer Control 6.0' control ( usually C:\Windows\System32\msinet.ocx) having saved the file first , now you can send it... Public Sub FTPtheFile(sFileName As String) Dim oFTP As FFTPController Set oFTP = New FFTPController With oFTP .URL = sFTP_URL .Login = sFTP_USER .Password = sFTP_PWD .SourceFile = sFileName .TargetPath = sFTP_PATH .Show vbModal If .FileSent Then MsgBox "Sent at " & Now() End If End With Unload oFTP End Sub "Gwyndalf" wrote: I manually upload a results sheet to a server - I want to be able to do this via a macro. 1. Save a particular page as a web page with a pop up for the sheet name 2. Open the FTP server programme and log on using a user name and password 3. Select upload, within the FTP programme, of the file created in '2' 4. Close the ftp programme Can this be done? Thanks in anticipation |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How To Access Thru News Server | Excel Discussion (Misc queries) | |||
Access to Server folders | Excel Programming | |||
Grrrrr.... can't access Server object ??!!?? | Excel Programming | |||
Export from Access/SQL Server | Excel Discussion (Misc queries) | |||
ado connection to access vs. sql server? | Excel Programming |