View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Leith Ross[_184_] Leith Ross[_184_] is offline
external usenet poster
 
Posts: 1
Default Split Function gives rn-time error


Hello David,

The Split function returns an Array of the separated elements in th
string. The first element of the Array is zero the last element i
found using the UBound function. You have to rebuild the string fro
the array elements. You might want to use the Replace functio
instead.


Code
-------------------

Sub test()

Dim txt as String

txt = Replace("abc;xyz;456m;9a6d", ";", Chr$(vbKeySpace))

Msgbox Txt

End su
-------------------

Sincerely,
Leith Ros

--
Leith Ros
-----------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...fo&userid=1846
View this thread: http://www.excelforum.com/showthread.php?threadid=48097