Open files in vb5-VBForums
Results 1 to 7 of 7

Thread: Open files in vb5

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2017

    Open files in vb5

    I have multiple word and excel 2007 files on desktop in a folder and would like to view them in a list box and subsequently open any of the file through button after selected.
    Two problems are coming up:
    1----- Doc and xls files are not coming in List box together; only doc files are visible?
    2----- After selecting file in List box and pressing button an error message pop up Run time error 424 and beneath it "Object Required".
    below link!ApB75VvFFQtogTE9mIiVnpcql4Li

    is for the files to view coding.



  2. #2
    Frenzied Member
    Join Date
    Dec 2008

    Re: Open files in vb5

    This should not be posted in the Codebank, it should be posted here instead -

    The fact that you are using VB5 should not be a problem for us VB6 users.

    Some members may be wary of clicking a link.
    Zip up your project, and attach it.
    Yell out if you do not know how to do that.


  3. #3
    Super Moderator FunkyDexter's Avatar
    Join Date
    Apr 2005
    An obscure body in the SK system. The inhabitants call it Earth

    Re: Open files in vb5


    Welcome to the forum Amir.
    You can depend upon the Americans to do the right thing. But only after they have exhausted every other possibility - Winston Churchill

    Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd

  4. #4
    Join Date
    Dec 2004

    Re: Open files in vb5

    Some members may be wary of clicking a link
    while uploading the whole project may be a good idea, it would probably help if you also added the relevant parts of the code (in code tags) to a post, especially if the project is quite big
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed

  5. #5
    Join Date
    Feb 2012
    West Virginia

    Re: Open files in vb5

    Yes, you should post the related code section directly in your post.
    That is easier for us and will get more eyes on your issue.

  6. #6
    Frenzied Member
    Join Date
    Dec 2008

    Re: Open files in vb5

    I have made one up for you.
    It has browse for Folder (or you can type a folder name)
    It has ability to select doc or xls or both
    It lists them alphabetically in a listbox
    If you click an entry in the listbox it opens it in Word or Excel
    It has no dependencies, and no flippin FSO

    I don't mind attaching it, however I will get thumped by a few members, as they like to get the feeling that you have made some effort yourself.

    What am I supposed to do ?

  7. #7
    Fanatic Member Spooman's Avatar
    Join Date
    Mar 2017

    Re: Open files in vb5


    Let me joint Funky in welcoming you to the Forums ..

    Some members (me included) are a little wary of downloading files.
    So, if you could post it (or a portion of it) as suggested, it would be a start.

    If you are not sure how to do that, try this
    1. Begin a new post here in this thread
    2. Look in the menu bar of the "Quick Reply" window .. at the right-hand side, there is a "#" button.
    3. This is referred to as a "code wrapper"
    4. Cut and paste your code here.
    5. Then select it, and click that button.

    Holler if you have any questions about dong that


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