Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
If you are using VB5 and need Replace function tha...
Author:
Arkady Adler
E-mail:
Click to e-mail author
Submitted:
7/24/2000
Version:
VB5
Compatibility:
VB5
Category:
String Manipulation
Views:
10718
If you are using VB5 and need Replace function that's available only in VB6, here is my version of it. Please let me know what you think.
Declarations:
'none
Code:
Function fnReplace(ByVal InWhat As String, What As String, WithWhat As String) As String Dim Pos As Long: Pos = InStr(InWhat, What) While Pos fnReplace = fnReplace & Left(InWhat, Pos - 1) & WithWhat InWhat = Right(InWhat, Len(InWhat) - Pos - Len(What) + 1) Pos = InStr(InWhat, What) Wend fnReplace = fnReplace & InWhat End Function
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement