Hi all,
I'm currently trying find a solution which will parse from a string
each unique set of sub-strings:
beginning with: '"EMTag_" & UCase(Excel.Application.UserName) & ">"
and
Ending with : "<EMTag"
UCase(Excel.Application.UserName) will a variable within the substrings.
I thought of possibly using regular expressions in some such statement.'"EMTag_" & UCase(Excel.Application.UserName) & ">" & "ANT" & "<EMTag"
Not sure if it's possible to something likeWith CreateObject("vbscript.regexp")
'"EMTag_" & UCase(Excel.Application.UserName) & ">" & "ANT" & "<EMTag"
.Pattern = "[EMTag_] * [<EMTag] ' <don't know if this is correct
.IgnoreCase = False
.Global = True
lCount = .Execute(S).Count
'If lCount Then StoreIt2 = Trim(.Replace(Me.Txt_DESCRIPTION.Text, " " & "$1"))
'MsgBox .Text
' If lCount Then StoreIt2 = Trim(.Replace(.Text, " " & "$1"))
' "$1" = Ucase(Left("$1", 1)) & mid("$1",Len($1)-1)
If lCount Then
For i = 1 To lCount
UserForm17.ListBox1.AddItem (.Execute(S)) < loop for each Lcount and add each unique expression to the listbox.
Next i
End If
![]()
Please Login or Register to view this content.
I really hope this make sense as to what I'd like to accomplish.
Any help is greatly appreciated.
Bookmarks