Results 1 to 40 of 40

Thread: Coding Fix

Hybrid View

  1. #1
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: Coding Fix

    Code:
    Private Sub Command3_Click()
    Open "X:\Movies.txt" For Append As #1
    Write #1, Text1.Text,Text2.Text,Text3.Text,Text4.Text,Text5.Text
    Close #1
    List1.Clear
    List2.Clear
    List3.Clear
    List4.Clear
    List5.Clear
    
    Call Form_Load
    End Sub
    
    
    Private Sub Form_Load()
    dim a as string,b as string,c as string,d as string,e as string
    Open "X:\Movies.txt" For Input As #1
    Do While Not EOF(1)
    Input #1, a,b,c,d,e
    List1.AddItem a
    List2.AddItem b
    List3.AddItem c
    List4.AddItem d
    List5.AddItem e
    Loop
    Close #1
    End Sub
    I made small corrections to your code...

    And inside the delete button, you can write this code for saving the data after deleting:
    Code:
    dim i as integer
    Open "X:\Movies.txt" For output As #1
    for i=0 to list1.listcount-1
    Write #1, list1.(i),list2.(i),list3.list(i),list4.list(i),list5.list(i)
    next i
    close #1
    I haven't tested them...

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  2. #2

    Thread Starter
    Member
    Join Date
    Nov 2009
    Location
    England
    Posts
    51

    Re: Coding Fix

    Write #1, list1.(i),list2.(i),list3.list(i),list4.list(i),list5.list(i)

    This line comes up red ?
    and says syntax error

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width