-
Replace
Hi im trying to use "replace" however i think it is only available with "Microsoft Access 9.0 Object Library" and im using A97, all my users are using A97, does anyone know of a method of either using this command, or using the reference without having to install it on everyones PC? can you embed libraries in your db ?
Trying to do:
Replace(strPath...
-
Function MyReplaceFunction(SourceString As String, String1 As String, String2 As String) As String
Dim m_Excel As Excel.Application
Set m_Excel = New Excel.Application
MyReplaceFunction = m_Excel.WorksheetFunction.Substitute(SourceString, String1, String2)
m_Excel.Quit
Set m_Excel = Nothing
End Function
Sub UseMyReplaceFunction()
Dim myString As String
myString = "Original Source String"
myString = MyReplaceFunction(myString, "Source", "User")
Debug.Print myString
End Sub
-
Whoa!! You don't need to create an Excel application every time you want to replace a string!!!
Follow this "How to" article on MSDN:
http://support.microsoft.com/default...b;en-us;109330
-
My first answer was going to be "make everybody upgrade" but that works too.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|