ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Multiple entries put into string (https://www.excelbanter.com/excel-programming/432292-multiple-entries-put-into-string.html)

gims289

Multiple entries put into string
 
I have a userform textbox that accepts multiple entries (Multiline = True).
The values of that textbox are then saved into a single cell to be called
later.

When calling that info and incorporating it into a string, how do I put a
comma between the entries that were originally entered?

smartin

Multiple entries put into string
 
gims289 wrote:
I have a userform textbox that accepts multiple entries (Multiline = True).
The values of that textbox are then saved into a single cell to be called
later.

When calling that info and incorporating it into a string, how do I put a
comma between the entries that were originally entered?


Try something like

MyModifiedString = Replace(Me.TextBox1.Text, vbCrLf, ",")

gims289

Multiple entries put into string
 
That's what I was looking for. Thanks.

"smartin" wrote:

gims289 wrote:
I have a userform textbox that accepts multiple entries (Multiline = True).
The values of that textbox are then saved into a single cell to be called
later.

When calling that info and incorporating it into a string, how do I put a
comma between the entries that were originally entered?


Try something like

MyModifiedString = Replace(Me.TextBox1.Text, vbCrLf, ",")


Ron Rosenfeld

Multiple entries put into string
 
On Tue, 11 Aug 2009 15:36:01 -0700, gims289
wrote:

I have a userform textbox that accepts multiple entries (Multiline = True).
The values of that textbox are then saved into a single cell to be called
later.

When calling that info and incorporating it into a string, how do I put a
comma between the entries that were originally entered?


Perhaps, in your code, REPLACE vbLF with ", "

--ron


All times are GMT +1. The time now is 01:32 AM.

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