Ok I got it saving now how do I load the file and put all the entries in a listbox?

Brian

On Sep 25, 2006, at 10:04 PM, CV wrote:


On Sep 25, 2006, at 5:36 PM, Brian Heibert wrote:

I have a listbox named  urlsv

I am using this code to save a file

 Dim file As FolderItem
  Dim fileStream as TextOutputStream
  file=GetSaveFolderItem("","URL Database")
  file.MacType = "Text"
  If file<> Nil then
    fileStream=file.CreateTextFile
    fileStream.WriteLine urlsv.text
    fileStream.Close
  end if

It only saves one url if the person enters more than one url the other urls don't get saved

I am using this to add a url to the list

  IF urlfield.text <> "" then
    urlsv.addrow urlfield.text
  else
    MSGBOX "No URL Found in entry field."
  end if

How can I get it to save all the urls entered into the listbox?

You need to step through all of the rows, more like this:

dim File as FolderItem
dim FileStream as TextOutputStream
file=GetSaveFolderItem("","URL Database")
If file <> Nil then
 FileStream = file.CreateTextFile
   If FileStream <> Nil then
      For i = 0 to urlsv.ListCount - 1
           FileStream.WriteLine urlsv.List(i)
      Next
  End
End


Best,

Jack
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to