+ Reply to Thread
Results 1 to 3 of 3

Open file with command button... but...

  1. #1
    Forum Contributor
    Join Date
    08-16-2010
    Location
    Holland, MI
    MS-Off Ver
    Excel 2007
    Posts
    110

    Open file with command button... but...

    Hello all,
    I'm trying to figure out how to use a command button to open a file. However, I want the button to use the information in a message box as part of the file name.

    Basically, my userform pulls in quote information and the quote name from a spreadsheet. I want to add a button to that user form that, when clicked will open the actual quote in whatever form it is (.doc, .pdf, .xlsx, .xlxm, etc). Not sure if that's possible... All files will be in the same location and if it simplifies things, I can make sure they're all in the .pdf form, but the main thing is that the name of the quote will be displayed in the message box and I'm not at all sure how to use that info to open the file.

    I'm including a pic of the userform.

    quote.jpg

    Thanks!

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Open file with command button... but...

    jfoerch,

    When you say messagebox, do you mean the selected "Quote Number"?
    If so, since all the items are in the same folder, you could use the following code:
    Please Login or Register  to view this content.


    Hope that helps,
    ~tigeravatar

  3. #3
    Forum Contributor
    Join Date
    08-16-2010
    Location
    Holland, MI
    MS-Off Ver
    Excel 2007
    Posts
    110

    Re: Open file with command button... but...

    AMAZED. You guys are good. Worked like a champ. Thanks so much.

+ 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