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

x
?
Solved

VB6 - Remove last comma in Textbox

Posted on 2014-02-12
2
Medium Priority
?
320 Views
Last Modified: 2014-02-12
Hi all

I would like to know how i can remove in my Text5 the last comma chowing at the end.

Ex;

If i have the value ; 1,2,3,4,5,6,7,8,

Then, it should remove the last ",".

The final answer would be: 1,2,3,4,5,6,7,8


But if i have the value: 1,2,3,4,5,6,7,8

Then since their is no comma as the last digit in the TextBox, the final answer would stay the same: 1,2,3,4,5,6,7,8

How can i do that?

Thanks
0
Comment
Question by:Wilder1626
[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
2 Comments
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 2000 total points
ID: 39855002
This should remove any trailing commas
    Do While Right(Text1.Text, 1) = ","
        Text1.Text = Left(Text1.Text, Len(Text1.Text) - 1)
    Loop

Open in new window

0
 
LVL 11

Author Closing Comment

by:Wilder1626
ID: 39855009
HI

This is great. Thanks for your help
0

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

604 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