+ Reply to Thread
Results 1 to 2 of 2

Open files from Listbox outside of Excel.

  1. #1
    Registered User
    Join Date
    06-15-2016
    Location
    canada
    MS-Off Ver
    2013
    Posts
    63

    Open files from Listbox outside of Excel.

    i have this code below but I don't know how to get it to open outside of excel because my files are all in PDF format. How can I modify this?

    Private Sub ListBox1_Click()
    Dim strFileandPath As String

    strFileandPath = (Label9 & ListBox1)
    Workbook.open strFileandPath
    End Sub
    I got the files to open using this code but this doesn't open it on a pdf editor of my like, instead it opens it with adobe acrobat reader. any ideas?

    Please Login or Register  to view this content.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: Open files from Listbox outside of Excel.

    For that code to work as it is I think you would need to change the application associated with PDF files to the one you prefer.
    If posting code please use code tags, see here.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Populate Listbox with PDF Files and Open File
    By wtfadli in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-13-2016, 02:56 AM
  2. Listbox of open files with a common worksheet name
    By cboud in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-21-2016, 05:58 PM
  3. [SOLVED] Open excel files, copy sheet 1 to new location and close original files
    By ghostly1 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-08-2015, 11:48 AM
  4. [SOLVED] Save/Closed only macro related files and leave unrelated files open in excel?
    By rdowney79 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-12-2013, 04:17 PM
  5. Listbox open files pdf
    By savyback in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 08-10-2013, 08:46 AM
  6. one folder & so many excel files are save, i want name change without open excel files
    By sonu_kumar444 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-14-2013, 03:45 PM
  7. Replies: 1
    Last Post: 01-31-2012, 09:07 PM

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