Find Next Part Number using Vba

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
This one should be easy for all the vba gurus out there. What I'm looking to do is find the next available part number in a certain job folder. the folder structure is as follows:
T:\Jobs\Jobs JA-JZ\JF8\PARTS
When the designers detail out parts, (primarily in AutoCAD, not quite using 3D but that's the direction we are headed..) they need to know the next available number in the Parts folder so they can fill in their title block. As we transition to 3D, we need the same functionality but for saving part files. I have a userform set up to receive the next number but I have no idea as how to gather all the current part numbers into a collection, sort them from lowest part number to highest (ex: the first PN a designer uses above is JF8x101, where the "x" could be "A", "B", "C", etc for the sheet size its drawn on), then exclude any parts that don't begin with the job number string "JF8" (We sometimes use reference parts from other jobs that shouldn't be included). That's the pseudocode. The implementation is beyond my skills at this point.
And one other point - there's times when part numbers are intentionally skipped. A designer may skip using part numbers JF8x150-153 to allow for a future weldment. The program would have to find the next number as JF8x150, not JF8x154. If that makes sense.
Any programs or helps are always appreciated.
Here's what the userform looks like.(see attached)