Results 1 to 3 of 3

Thread: Best Save Code*Resolved-thanks*

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2003
    Location
    Vb Forums
    Posts
    226

    Best Save Code*Resolved-thanks*

    Ok im just curious what the best code is to save the contents in List1... I have code but people say it isnt that good and it is:
    VB Code:
    1. On Error GoTo Error_Killer
    2.     With CD1
    3.         .DialogTitle = "Save Log File"
    4.         .Filter = "All Supported Types|*.log;*.crk;*.txt|"
    5.         .ShowSave
    6.     Dim Nbr As Long
    7.     On Error Resume Next
    8.     Open .FileName For Output As #1
    9.     For Nbr = 0 To List1.ListCount - 1
    10.         Print #1, List1.List(Nbr)
    11.     Next Nbr
    12.     Close #1
    13.     End With
    14.     Exit Sub
    15. Error_Killer:
    16. Exit Sub

    So im just using a command button to save the contents of List1... So how would I change it to make it the best way possible? Really appreciate the help guys thanks
    Last edited by _Vb_N00bie_; Feb 20th, 2003 at 06:03 PM.
    Thanks For The Help Guys

  2. #2
    Let me in .. techyspecy's Avatar
    Join Date
    Aug 2002
    Location
    Back to VBF.
    Posts
    2,456

    Re: Best Save Code

    Originally posted by _Vb_N00bie_
    Ok im just curious what the best code is to save the contents in List1... I have code but people say it isnt that good and it is:
    VB Code:
    1. On Error GoTo Error_Killer
    2.     With CD1
    3.         .DialogTitle = "Save Log File"
    4.         .Filter = "All Supported Types|*.log;*.crk;*.txt|"
    5.         .ShowSave
    6.     Dim Nbr As Long
    7.     On Error Resume Next
    8.     Open .FileName For Output As #1
    9.     For Nbr = 0 To List1.ListCount - 1
    10.         Print #1, List1.List(Nbr)
    11.     Next Nbr
    12.     Close #1
    13.     End With
    14.     Exit Sub
    15. Error_Killer:
    16. Exit Sub

    So im just using a command button to save the contents of List1... So how would I change it to make it the best way possible? Really appreciate the help guys thanks
    This way is just fine and there is nothing wrong with it, whoever says that it's not good or something is a fool.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Feb 2003
    Location
    Vb Forums
    Posts
    226

    Re: Re: Best Save Code

    Originally posted by techyspecy
    This way is just fine and there is nothing wrong with it, whoever says that it's not good or something is a fool.
    Hehe ok thanks man I appreciate your help very much have a good day
    Thanks For The Help Guys

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