+ Reply to Thread
Results 1 to 5 of 5

Open a document from a Combo Box drop down list with a Command Button.

  1. #1
    Registered User
    Join Date
    09-15-2011
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    82

    Open a document from a Combo Box drop down list with a Command Button.

    Hi Everyone

    I hope someone is able to help me.

    We use Excel 2003 at work. I have a workbook that contains 2 combo box's and 2 command buttons. What I hope someone can help me with is I need some code if possible that when the user selects a document name from the validation drop down list in the combo box and then clicks on the command button it will open that document for use. The documents are all kept in a seperate folder here C:\Users\Home\Documents\Manager Forms, and are a mixture of Word docs, text docs and PDF files.

    Is anyone able to help please as I do not know much about VBA code at all

    Ortz

    I have attached a sample file here if it helps
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    09-15-2011
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    82

    Re: Open a document from a Combo Box drop down list with a Command Button.

    I've found the following code from a different thread that works fantastic but only for .xls files in our folder.

    Please Login or Register  to view this content.
    But it doesnt open any other format

    Can anyone help and manipulate the code so that it will also open .doc, .txt and .pdf files that are in the folder too ?

    I've tried and am getting no where

    Thanks if someone can help

    Ortz

  3. #3
    Registered User
    Join Date
    09-15-2011
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    82

    Re: Open a document from a Combo Box drop down list with a Command Button.

    Sorry to bump this but I was hoping for some help before Monday morning. I really need to have this working by then

  4. #4
    Forum Contributor
    Join Date
    04-06-2006
    Posts
    131

    Re: Open a document from a Combo Box drop down list with a Command Button.

    I am pretty new to VBA myself, but I THINK this will work...

    Please Login or Register  to view this content.
    I hope that helps!!

    ---------- Post added at 02:02 PM ---------- Previous post was at 02:00 PM ----------

    it just occured to me.... That will only work for the Word Documents... I am not sure how to do the same for ther Notepads and PDFs...

  5. #5
    Registered User
    Join Date
    09-15-2011
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    82

    Re: Open a document from a Combo Box drop down list with a Command Button.

    Thanks nevi

    Thats the problem I have. I need some code for the Command Button that will open whatever file is selected from the drop down list of the ComboBox whether its Excel, Word, PDF or notepad. The code I have above will open any Excel file thats selected but it wont open any files of the other 3 formats, and thats where I am stuck

    Anyone else able to help. Thats if it is possible at all, I dont know whether it can be done or not.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1