Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi blatham
Replace and some other string functions are not available in XL97 Use Substitute in XL97, and the slightly faster Replace for later versions. The conditional #If VBA6 will prevent a compile error in XL97's VBA5. Sub test() #If VBA6 Then myStr = Replace("dunno why...", "dunno", "do know") #Else ' it's XL97 myStr = Application.Substitute("dunno why...", "dunno", "do know") #End If End Sub Regards, Peter T "blatham" wrote in message ... Nah, perhaps it was introduced in a later version. Suppose 97 is a bit old now! Thanks anyway. -- blatham ------------------------------------------------------------------------ blatham's Profile: http://www.excelforum.com/member.php...o&userid=19441 View this thread: http://www.excelforum.com/showthread...hreadid=398507 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I remove all spaces in a text string | Excel Discussion (Misc queries) | |||
how do I remove leading spaces and leave the remianing spaces w | Excel Worksheet Functions | |||
Find String in another string - only between spaces | Excel Worksheet Functions | |||
Remove spaces from a string variable | Excel Programming | |||
how do I remove empty spaces trailing a text string? | Excel Worksheet Functions |