Public Function InsertString( _
ByVal vDest As Variant _
, ByVal vSource As Variant _
, Optional ByVal vInsertPosition As Variant _
) As Variant
Insert one string into the middle of another string and return the results.
vSource is inserted into vDest before character position vInsertPosition.
Summary: Similar to the StrIns subroutine, except that this is a function which returns the result instead of modifying an argument.
Example: InsertString("123456", "NEW", 3) = "12NEW3456"See also: OverlayString Function
DeleteString Function
StrIns Subroutine
Function returns Null if both strings (vDest and vSource) are Null. vDest:
The string into which the other string is to be inserted. vDest
defaults to an empty string if it is Null or cannot be fixed up to a
String.
vSource:
The string which is to be inserted into the other string. vSource
defaults to an empty string if it is Null or cannot be fixed up to a
String.
http://www.tek-tips.com/viewthread.cfm?qid=929958
http://p2p.wrox.com/topic.asp?TOPIC_ID=75032