Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Re-format data

Status
Not open for further replies.

crapplet

MIS
Aug 13, 2010
5
US
Is there a way to reformat text currently in column format to horizontal. For example I have data such as:

Denver
Dallas
New Orleans
Baton Rouge
Seattle

I would like to re-format the data to:

Denver, Dallas, New Orleans, Baton Rouge, Seattle

Thank you in advance
 
A starting point:
Code:
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("input.txt", 1)
strLine = Replace(objFile.ReadAll, vbCrLf, ", ")
objFile.Close
MsgBox strLine

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
wow, i was seriously over thinking that, thank you very much!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top