Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default VBA Stringbuilder

Hello,

I am just wondering if it is somehow possible to use any sort of
Stringbuilder class in VBA for excel macros to speed up multiple
string concatenations. And if so, how?

David

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default VBA Stringbuilder


not sure what you're talking about but

Sub makestring()
For Each c In range("d2:d15")
If c < "" Then ms = ms & "," & c
Next c
MsgBox Right(ms, Len(ms) - 1)
End Sub

--
Don Guillett
SalesAid Software

"David G" wrote in message
oups.com...
Hello,

I am just wondering if it is somehow possible to use any sort of
Stringbuilder class in VBA for excel macros to speed up multiple
string concatenations. And if so, how?

David



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 236
Default VBA Stringbuilder


Dynamically you can create arrays and concatenate them using join :

Sub f()
a = Array("asdfa", "sfasdfa")
d = Join(a, ";")
MsgBox d
End Sub

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default VBA Stringbuilder

Here is a VB implementation which I've used in the past and is easily converted to VBA - works very well.

http://www.awprofessional.com/articl...p?p=25175&rl=1

--
Tim Williams
Palo Alto, CA


"David G" wrote in message oups.com...
Hello,

I am just wondering if it is somehow possible to use any sort of
Stringbuilder class in VBA for excel macros to speed up multiple
string concatenations. And if so, how?

David



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default VBA Stringbuilder

I also seem to recall comparing the string builder class (see other post) with writing the info directly to a local file and the
file approach won hands down.

--
Tim Williams
Palo Alto, CA


"David G" wrote in message oups.com...
Hello,

I am just wondering if it is somehow possible to use any sort of
Stringbuilder class in VBA for excel macros to speed up multiple
string concatenations. And if so, how?

David





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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



All times are GMT +1. The time now is 02:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"