Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

vb readline remove comma's

Posted on 2013-11-01
3
Medium Priority
?
379 Views
Last Modified: 2013-11-01
folks

in my vb macro I am using the readline method that copies an entire row/line from a text file, how can I remove comma's from being carred into the line? the problem is that some of my rows contain comma's and seeing that I an writing the readline value into a text file with additional data's delimited with a comma from eachother which causes confusion

all help will do
0
Comment
Question by:rutgermons
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 43

Accepted Solution

by:
Saqib Husain, Syed earned 2000 total points
ID: 39618048
Something like

var = replace(var,",","")
0
 
LVL 22

Expert Comment

by:rspahitz
ID: 39618058
depending on the purpose of the commas, you may want to use the above but replace with tabs instead of empty-string:

var = replace(var,",",vbTab)

Or you may want to break the pieces up into parts and apply them in different ways as individual values:

Dim items() As String
Dim itemCntr As Integer

items = Split(inputlineText, ",")
For itemCntr=0 to UBound(items)
  Debug.Print items(itemCntr)' or other code to do something with the item
Next
0
 

Author Comment

by:rutgermons
ID: 39618059
exactly what I needed

solution is : strData = Replace(objLogFile.ReadLine, ",", "")
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question