Results 1 to 5 of 5

Thread: how to display the files .......?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2002
    Posts
    157

    how to display the files .......?

    how to display the files which is file1.filename exactly in a text1.text ?

    i.e i want to display al the files which is in File1 in a text box

    Regds

    Sam F.

  2. #2
    Member
    Join Date
    Jul 2003
    Location
    UK
    Posts
    60
    I'm not quite sure what you mean. If you want to concatenate a number of files together in a text box then simply use the code:

    text1.text=text1.text & moretext

    Text boxes are limited to 32k of data. If you want a WYSIWYG display then you may have to use the RichTextBox. Hope this helps.

    Nick

  3. #3
    Member 0pal_t0ad's Avatar
    Join Date
    Oct 2003
    Location
    Southampton,UK
    Posts
    63
    text1.text = file1.filename
    When i write my code, there are only 2 ppl that understand it, me and God... a week later... God only knows
    (can't remember where i heard/read that)

  4. #4
    Software Eng. Megatron's Avatar
    Join Date
    Mar 1999
    Location
    Canada
    Posts
    11,286
    If you meant how to open the file selected by a FileListBox:
    Code:
    Open Dir1 & File1.Filename for Input As #1
    Text1.Text = Input(LOF(1), 1)
    Close #1

  5. #5
    Frenzied Member dis1411's Avatar
    Join Date
    Mar 2001
    Posts
    1,048
    VB Code:
    1. Dim L As Long
    2. Dim s As String
    3.  
    4. Private Sub Command1_Click()
    5.     s = vbNullString
    6.     For L = 0 To File1.ListCount - 1
    7.         s = s & File1.List(L) & vbCrLf
    8.     Next
    9.     Text1.Text = s
    10. 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