Consulting

Results 1 to 3 of 3

Thread: Solved: problem in opening a specific filename

  1. #1

    Solved: problem in opening a specific filename

    http://yfrog.com/2g79530888j

    From the picture we can see a combobox and a button. What I need to do now is that once I select a combobox and hit the button. I should able to retrieve a file by the name that is exactly same as the combobox name. For e.g. when I select “testorder” combobox, I should able to select a file name that has to be by the name of “testorder”.

    So If I select a filename that is not same as the combobox name, then there will be a message pop out saying “Not a valid filename”.

    I have created all the codes to do this for the combobox. Value = ”testorder” and there is no error in my program, but it is not opening the file.

    I have attached a sample workbook with all my codes and a testorder file which I need to open

    Attachment 4950

  2. #2
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,876
    A filename which has no extension seems to be picked up by GetOpenFilename with a dot at the end.
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

  3. #3
    Thanks p45cal for your help. it worked

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •