PC Review


Reply
Thread Tools Rate Thread

array replace

 
 
Frank
Guest
Posts: n/a
 
      10th Jul 2004
Hello all,
is there a more efficient way to do the next replace?
For i = 0 To arrMsg .GetUpperBound(0)

arrMsg (i) = arrMsg (i).ToString.Replace(vbCr, "")

Next i



Thanx



 
Reply With Quote
 
 
 
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      10th Jul 2004
* "Frank" <(E-Mail Removed)> scripsit:
> is there a more efficient way to do the next replace?
> For i = 0 To arrMsg .GetUpperBound(0)
>
> arrMsg (i) = arrMsg (i).ToString.Replace(vbCr, "")
>
> Next i


I doubt that there is a more efficient way. But you can skip the
'ToString' if you are dealing with an array of strings.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
 
Reply With Quote
 
=?Utf-8?B?SmF5IFZpbnRvbg==?=
Guest
Posts: n/a
 
      11th Jul 2004
If the number of elements won't be changing, a small small improvement would be

x = arrMsg .GetUpperBound(0)
For i = 0 To x

Jay
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Array - delete and replace elements kalle Microsoft Excel Programming 2 18th Apr 2011 06:03 AM
Replace value in cell with value from a table/array? 43fan Microsoft Excel Programming 1 8th Dec 2007 10:30 PM
array instead of replace feature? =?Utf-8?B?TWFzT01lbm9z?= Microsoft Excel Programming 3 24th May 2007 04:21 AM
Replace Input box with Project Array GregR Microsoft Excel Programming 0 10th May 2006 07:48 PM
Replace function with array formula Don Microsoft Excel Programming 2 7th Aug 2004 03:14 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:38 PM.