How do I open files through Visual Basic 6?

280 pts.
Tags:
Visual Basic
Visual Basic 6
How can I open a file (DOC, PPT, XLS, MDB, ETC) by calling from Visual Basic 6.0?

Answer Wiki

Thanks. We'll let you know when a new response is added.

This site has samples of code in a “How to” Format. This page for the site, as well as this one will probably get you started. The site seems like a real handy reference for importing files in VB6.
Good Luck!
-Flame

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Brijesh

    To access the different format you may have to code for it separately. Below link has got the overview how to code with the read and write process in VB.


    http://msdn.microsoft.com/en-us/library/y32kbeb6.aspx


    Hope it helps


    14,405 pointsBadges:
    report
  • jamika
    may this help
     Dim objForm As UserForm1
       
        Set objForm = New UserForm1
        objForm.Show vbModal
        Set objForm = Nothing
       
    End Sub
    Private Sub cmdOpenDocument_Click()
       
        'Put this code behind a UserForm.
        'Assuming you have a command button named "cmdOpenDocument" in your
        'UserForm, this code will open a document and keep the UserForm running.

        Dim objDocument As Word.Document
       
        Set objDocument = Documents.Open("MyDoc.doc  With objDocument
            'Manipulate the document object here if desired.
        End With
        Set objDocument = Nothing
       
    End Sub

    Private Sub cmdOpenDocument_Click()

        'OR, assuming you have a command button named "cmdOpenDocument" in your
        'UserForm, this code will open a document and close the UserForm.
       
        Documents.Open "MyDoc.doc"
        Me.hide

    End Sub
    45 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: