In Progress

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

Skills: Visual Basic

See more: 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

About the Employer:
( 2 reviews ) Dublin, Ireland

Project ID: #14795465

Awarded to:

ksriniravi

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 More

€50 EUR in 2 days
(25 Reviews)
5.2

12 freelancers are bidding on average €126 for this job

schoudhary1553

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 More

€150 EUR in 3 days
(80 Reviews)
6.7
avinav606lx

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 More

€89 EUR in 1 day
(54 Reviews)
5.6
zu02

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

€155 EUR in 3 days
(20 Reviews)
5.3
barundebnath

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 in 7 days
(16 Reviews)
4.8
huongth

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 More

€100 EUR in 3 days
(7 Reviews)
2.8
jaydeepniper2011

A proposal has not yet been provided

€30 EUR in 1 day
(4 Reviews)
2.0
chintuag

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 More

€37 EUR in 2 days
(1 Review)
1.4
€166 EUR in 1 day
(0 Reviews)
0.0
€155 EUR in 3 days
(0 Reviews)
0.0
Steev07

A proposal has not yet been provided

€155 EUR in 3 days
(0 Reviews)
0.0
€222 EUR in 5 days
(0 Reviews)
0.0