FTP uploading

G

Guest

Just to add. If the FTP site is not password protected and you are
transfering a workbook, you might be able to just do a saveas. See Stephen
Bullen's comments in the thread referenced below for some information:

Comments by Stephen Bullen:

http://groups.google.com/groups?threadm=Outfjoj2#GA.202@cppssbbsa05

--
some other references:

http://support.microsoft.com/default.aspx?scid=kb;en-us;195653
SAMPLE: Using FTP WinInet APIs in Visual Basic with SimpleFtp (Q195653)

http://support.microsoft.com/default.aspx?scid=kb;en-us;175179
SAMPLE: VBFTP.EXE: Implementing FTP Using WinInet API from VB
 
G

Gwyndalf

This works for me - converts the sheet into a htm file then uploads it to an
FTP address. You do need to add the FTP location to office first (but only
once).
Use 'open' and then in the drop down list of 'look in' select new FTP
location - type in your details - will even cover login and passwordword
protected servers and then run some code along the lines of:

With ActiveWorkbook.PublishObjects("GWYNS BRIDGE SCORER_11674")
.HtmlType = xlHtmlStatic
.Filename = "ftp://ftp.the site/directory/" & Range("B1").Text &
".htm"
.Publish (False)
.AutoRepublish = False
End With

The first line I reproduced by recording a macro hence the unusual
("GWYNS...")
The Filename extras were used to automatically name from a changing cell on
the sheet itself and then to ensure it was saved as an htm file.

I found it much easier, as a complete novice, than the example on tek-tips.
 
G

Gwyndalf

Yes is the easy answer:

Open excel then add the FTP site via the 'File' 'Open' and 'look in'
dropdown (Add FTP location) - you can even access password protected sites
with a username and the password of course!!

With ActiveWorkbook.PublishObjects("GWYNS BRIDGE SCORER_11674")
.HtmlType = xlHtmlStatic
.Filename = "ftp://ftp.site.addy/directory/" & Range("B1").Text &
".htm"
.Publish (False)
.AutoRepublish = False
End With

I recorded a macro for saving a specific sheet as an htm file and uploading
it.
The '& Range("B1") enabled me to automatically name the file from a cell on
the sheet (a date which changes) - the .htm stopped excel calling it an .mhtl
(or something similar)

Hope you find it simple to use
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top