Results 1 to 5 of 5

Get partial string from ActiveWorkBook.Path

Threaded View

  1. #1
    Forum Contributor Rick_Stanich's Avatar
    Join Date
    11-21-2005
    Location
    Ladson SC
    MS-Off Ver
    Office365
    Posts
    1,167

    Get partial string from ActiveWorkBook.Path

    I tend to stumble when trying to pull certain characters from strings, not sure how to stop and start my search.

    Dim sWbPath and sWbPathCust as Strings.
    sWbPath = ActiveWorkbook.Path
    Which is:
    F:\CNC Mill\#19 CNC CMM\Inspection Reports\SUNSTR\4503124\Results\33162-1\20
    The portion of text in Red is what I need from this path for another variable.
    sWbPathCust = sWbPath (some method of extracting the string)
    This portion of the path will always be the same:
    F:\CNC Mill\#19 CNC CMM\Inspection Reports\
    The remainder changes for many customers and part numbers.
    "SUNSTR\" = Customer and "4503124\" = Part Number
    The character length of Customer and Part Number varies for each. The only constants are the two "\" (Back slashes) after "Inspection Reports\".

    Any hints, tips and or examples are appreciated.
    Last edited by Rick_Stanich; 09-30-2009 at 11:06 AM. Reason: Corrected title
    Regards

    Rick
    Win10, Office 365

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