Results 1 to 3 of 3

Thread: Opening a file

  1. #1

    Thread Starter
    Hyperactive Member MPrestonf12's Avatar
    Join Date
    Jun 1999
    Location
    NY
    Posts
    330

    Post

    DOes anyone know how to open a file when first you use commondialog control to open the open box and then select the file to be opened in a textbox. Thanks
    Matt

  2. #2
    New Member
    Join Date
    Aug 1999
    Location
    RE,NJ,US
    Posts
    14

    Post

    I don't know what you're talkin about but if you try

    Shell "C:\Whateverpath\whateverfile.whatever"

    It might work for whatever but if it doesn't then whatever. see ya.


    ------------------
    []D Y R o

  3. #3
    Member
    Join Date
    Jan 1999
    Location
    Gig Harbor, WA, USA
    Posts
    48

    Post

    Loads a text file into a textbox:
    Code:
    Dim tempstr As String
    CommonDialog.Filename = ""
    CommonDialog.ShowOpen
    
    If CommonDialog.Filename <> "" Then
    Open "text.txt" For Input As #1
    Do While Not EOF(1)
    Line Input #1, tempstr
    TextBox.Text = Textbox.Text & vbCr & tempstr
    Loop
    Close
    End If
    ------------------
    (¯`·.¸¸.·´¯`·->ShadowCrawler<-·´¯`·.¸¸.·´¯)
    Teenage Programmer
    Visual Basic, HTML, C++, JavaScript

    http://welcome.to/X12Tech
    Email: [email protected]
    ICQ#: 9872708

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