ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Split Function gives rn-time error (https://www.excelbanter.com/excel-programming/344550-re-split-function-gives-rn-time-error.html)

Leith Ross[_184_]

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



All times are GMT +1. The time now is 12:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com