Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi,
I'm having a difficulty reading a column using a macro/vba into a string whereby it doesn't overwrite the string each time it grabs a new row's info from a column.
for instance say we have four car manufacturerscar manufacturer
-ford
-honda
-ferrari
-porscheeach time i get the column rows to assign it to a string, it overwrites the last. So inevitably I end up with the last one that is read; in this case it would be porsche.
what i'd like it to do is put it all on the same line for example:
ford; honda; ferrari; porsche
The reason I want to do this is so that in my microsoft access database I can read the 'email column' and grab all the emails and put it in the 'TO:' box in an outlook email..
Any ideas or methods would be great. Thanks

Dim c As Range, d As Object Set d = CreateObject("Scripting.Dictionary") For Each c In Selection If Not d.Exists(c.Value) Then _ d.Add c.Value, 0 Next c MsgBox Join(d.Keys, ";")

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |