bebig,
There is a certain amount of simple math that is involved whenever I want to find a string inside of a string. As Johnwm mentions, the inStr and mid functions would be two functions which would really get you going. Since the InStr function gives you the location to a single characher within your string as an integer, then what you have to do is figure out what charachters precede and procede the string you wish to grab. Once you have this knowledge you can then use the Mid function to set the starting position and the ending position of your treasured string. For instance...
Option Explicit
Function GetString(FirstChar As String, LastChar As String, TexttoSearch As String) As String
On Error GoTo GetString_err
Dim Startint As String
Dim Endint As String
Dim TmpString As String
Startint = InStr(1, TexttoSearch, FirstChar, vbTextCompare)
Endint = InStr(Startint, TexttoSearch, LastChar, vbTextCompare)
TmpString = Mid(TexttoSearch, Startint, Endint - Startint)
GetString = TmpString
Exit Function
GetString_err:
MsgBox "Error Number: " & Err.Number & vbCrLf & _
"Error Source: " & Err.Source & vbCrLf & _
"Error Description: " & Err.Description & vbCrLf, vbCritical, "Getstring Error"
Err.Clear
End Function
If you put this into a module then you will be able to search any string for a specific string. As you can see, the first InStr function locates the first instance of your starting search term, and the second instance of Instr locates the closest instance of the second search term. Since these you now have the two locations, you simply use the Mid function and a little subtraction to figure out what is between the two numbers. Note: this code does not have provisions in the event that the string is not found. This would be easy to insert, but I just didn't do it. Oops!
Ok, well, Now that you know the just of these two functions, you can now do all sorts of fun things with it; let your imagination run wild!!!
LF
"As far as the laws of mathematics refer to reality, they are not certain; as far as they are certain, they do not refer to reality."--Albert Einstein