VBA Code Modificatoin Needed

I have the following code I need modified to save a text file to an FTP site. The FTP site is saved to my computer. The current code looks into an existing column for the value "1" and if that exists, the code captures the data in a cell several columns over. Then it pops up a save dialog.

What I want to happen is that the file is saved automatically without the dialog box to an FTP site.

This is the file path:

ftp://[url removed, login to view]

This has been attempted by someone with basic VBA skills, but he ran into a problem saving to an FTP site.

Currently, when the Save dialogue box opens and I try to save to the FTP site I get this error:

"Bad file name or number"

The code is below:

Sub Button1_Click()

Dim r As Range

Dim c As Range

Dim OutputFileNum As Integer

Dim PathName As String

Dim RowNum As Integer

Dim SheetValues() As Variant

Dim filePathVariant As Variant

' displays the save file dialog

filePathVariant = [url removed, login to view]( _

FileFilter:="Text Files (*.txt), *.txt")

' checks to make sure the user hasn't canceled the dialog

If filePathVariant <> False Then

PathName = filePathVariant

OutputFileNum = FreeFile

Open PathName For Output Lock Write As #OutputFileNum

Set r = [url removed, login to view]([url removed, login to view]("AX8"), [url removed, login to view]("AW8").End(xlDown))

For Each c In [url removed, login to view]

If [url removed, login to view] = 50 And [url removed, login to view] = 1 Then

Print #OutputFileNum, [url removed, login to view]([url removed, login to view], 41).Value

End If

Next c

Close OutputFileNum

End If

End Sub

Compétences : Visual Basic

Voir plus : vba code format text word document, ftp vba excel code upload text file, free code insert text box vba, code vba ftp, convertir code vba php, gnenerate xml code vba excel, code vba refresh access, refresh button code vba, record microphone sourse code vba stop pause, convert lisp code vba, optimization function code vba, ean code vba, ftp code vba, code vba pay, outlook vba code extract text, code vba excel primavera critical path, auto reply text sample submission application, code vba ssl smtp php activex cdo vbnet, java code parse text file, convert perl code vba code, convert md5 hash code plain text, php code drop text message format provider, free code rich text html editor cnet, optimize code vba excel, code read text file

Concernant l'employeur :
( 2 commentaires ) Dublin, Ireland

N° du projet : #14795465

Décerné à :


I can fix the macro to save the file properly in ftp site for Eur 50. Relevant Skills and Experience 18 years experience in using Excel as part of daily work life. In the process, implemented lot of automation. Over t Plus

50 € EUR en 2 jours
(25 Commentaires)

12 freelance font une offre moyenne de €126 pour ce travail


Greetings sir, i am an expert freelancer for this job and your 100% satisfaction is assured if you allow me to serve. I can do this task as per your requirement Relevant Skills and Experience I have the 5 year Plus

150 € EUR en 3 jours
(80 Commentaires)

Hey There, Thanks for posting the project. Its looks feasible and am Interested to do it. I am an excel/access VBA automation professional having 7+ years of experience and can do it with the required quality. Nex Plus

89 € EUR en 1 jour
(54 Commentaires)

I'll fix it Relevant Skills and Experience vba Proposed Milestones €155 EUR - default

155 € EUR en 3 jours
(20 Commentaires)

VBA is a obsolete technology. You should use VB.Net or C# to create program which can solve your problem easily. Thanks. Relevant Skills and Experience C#, Vb.Net programmer. Proposed Milestones €200 EUR - Milestone

200 € EUR en 7 jours
(16 Commentaires)

Hi. I can create auto scripts to scrape websites, auto click, format txt, csv, xls, xlsx, doc, docx, rtf, json, xml, database files as you request. I can start right now Relevant Skills and Experience I am an expert i Plus

100 € EUR en 3 jours
(7 Commentaires)

A proposal has not yet been provided

30 € EUR en 1 jour
(4 Commentaires)

Dear Hiring Manager, I am a professional and working on excel for last 10 years. I have worked with macros and formula's to create dashboards, reports and automation. I have read the details of your project and I'm su Plus

37 € EUR en 2 jours
(1 Commentaire)
166 € EUR en 1 jour
(0 Commentaires)
155 € EUR en 3 jours
(0 Commentaires)

A proposal has not yet been provided

155 € EUR en 3 jours
(0 Commentaires)
222 € EUR en 5 jours
(0 Commentaires)