Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

save text to file vb


  • Please log in to reply

#1
shawn_programing

shawn_programing

    New Member

  • Member
  • Pip
  • 6 posts
is their a way to save the text to a file and the have it up load it to a web page to be down load to a clante?
  • 0

Advertisements


#2
Hai Mac

Hai Mac

    Member

  • Member
  • PipPipPip
  • 260 posts
Hello shawn,
I don't understand your question: what is a clante?. And do you want the upload to be done via VB or manually?
  • 0

#3
shawn_programing

shawn_programing

    New Member

  • Topic Starter
  • Member
  • Pip
  • 6 posts
clante = client . and the upload i would like to be vb.
  • 0

#4
Hai Mac

Hai Mac

    Member

  • Member
  • PipPipPip
  • 260 posts
OK, I am not sure about your programming skills yet, but let's try it. I suppose you have at least intermediate knowledge and experience in VB.

Saving files is done like this:
Open "C:\file.txt" For Output As #1
Write #1, "Some text"
Close #1
Change the C:\file.txt to your desired file name

Now to uploading the file. First add an Inet control through Project->Components. Add it on your form. Then add this code somewhere where you want
Inet1.Protocol = icFTP
Inet1.URL = "url"	'change this to the url where you want to upload the file
Inet1.UserName = "username"   'change this to the username
Inet1.Password = "pwd"   'enter your password here
Inet1.Execute , "PUT C:\file.txt file.txt"
Do While Inet1.StillExecuting
   DoEvents
Loop

Change "PUT C:\file.txt file.txt" to "PUT your_file_on_your_disc future_name_of_the_file_on_the_server"

I hope that was helpful :) :tazz: , believe, this is the simplest way.
  • 0

#5
shawn_programing

shawn_programing

    New Member

  • Topic Starter
  • Member
  • Pip
  • 6 posts
can you do this with more then 1 filed ( Txet box)
  • 0

#6
Hai Mac

Hai Mac

    Member

  • Member
  • PipPipPip
  • 260 posts
please please check what you write because I have problems understanding your replies. Try this:
Write #1, txtField1.Text
Write #1, txtField2.Text
...
etc.
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP