Results 1 to 3 of 3

Thread: How do I save contents in a label for later?

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2000
    Posts
    55

    Angry

    When I create a program...and say I want to have a statistics page or something of the sort, how do I save the contents that are in a textbox or a label? If I have a label named "LblInfo" what code would I type in if I wanted it to save its contents upon exiting the program? Please help me out...I need HELP!
    Beres

  2. #2
    Lively Member mrdarkwarez's Avatar
    Join Date
    Feb 2000
    Location
    Australia
    Posts
    113


    Dim tmpString As String
    tmpString = Text1.text

  3. #3
    Guest
    Here is how to load files:

    Code:
    Private Sub Command1_Click()
    Open "C:\file.txt" For Input As #1 
    Label1.Caption = Input$(LOF(1), 1)
    Close #1
    End Sub
    To save files:

    Code:
    Private Sub Command2_Click()
    Open "C:\file.txt" For Output As #1 
    Print #1, Text1.Text 
    Close #1 
    End Sub

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