+ Reply to Thread
Results 1 to 2 of 2

Opening outside files that contain a specific number in the file name...

  1. #1
    Registered User
    Join Date
    11-07-2011
    Location
    LI, NY
    MS-Off Ver
    Excel 2007
    Posts
    12

    Opening outside files that contain a specific number in the file name...

    Hey all,

    I've created an userform interface for an "engineering drawing" database at my job that can be used to add, search, edit and delete drawings to/from the database. Nothing too fancy, the database is in the same workbook as the userform and it collects 6 different criteria of information (i.e. Drawing #, Date, Customer, etc..).

    More importantly it can also be used to open up user selected pdf engineering drawing files that are located in a network folder. Basically, the user searches for a drawing number in the excel workbook (i.e. - 11425) and then has the option to open up the corresponding engineering drawing pdf file that's located in a network folder.

    The issue I'm having is that sometimes a drawing has a few revisions in the network folder and can be labeled as such: 11425, 11425-R1, 11425-R2, etc... I want to be able to open all files containing the root drawing number (11425) so if there are four drawing revisions plus the original, I want all 5 drawings to be opened.

    The code I have right now to open an exact match is (with some other things going on):

    Please Login or Register  to view this content.
    I'm new to VBA programming and have been referencing this book: http://="http://www.amazon.com/Excel...dp/0470044012", which is where I got the "ShellExecute" technique from, otherwise I would've never have known to do that.

    I tried putting an asterisk in front of .pdf for the filename as some sort of wildcard, but that didn't work. I'm assuming I'm also going to need to add some sort of while loop if there is a drawing with multiple revisions.

    Any help would be fantastic!

    -Tom

  2. #2
    Registered User
    Join Date
    11-07-2011
    Location
    LI, NY
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Opening outside files that contain a specific number in the file name...

    Ok, here's what I've figured out. If someone has another method they think is easier, don't hesitate to post:

    Please Login or Register  to view this content.

+ 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