Solved

How to read sign "/" on the textbox?

Posted on 2011-09-08
3
336 Views
Last Modified: 2012-06-27
I have textbox name text1.text it has a words "ab/cd/mm s/"  i want to read them separately.How? My point is i want to read the text separately by slush "/" is it possible?

Private Sub Command1_Click()
Dim a As String, b As String, c As String
MsgBox a & vbNewLine & b & vbNewLine & c
End Sub
0
Comment
Question by:Whing Dela Cruz
[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
3 Comments
 
LVL 47

Accepted Solution

by:
Martin Liss earned 500 total points
ID: 36506931
Dim strParts() As String

strParts = Split(Text1.Text, "/")

strParts(0) is "ab"
strParts(1) is  "cd"
etc
0
 
LVL 47

Assisted Solution

by:Martin Liss
Martin Liss earned 500 total points
ID: 36506953
If you have a variable number of slashes then


Private Sub Command1_Click()
Dim strParts() As String
Dim lngIndex As Long

strParts = Split(Text1.Text, "/")

For lngIndex = 0 To UBound(strParts)
    Debug.Print strParts(lngIndex)
Next

End Sub

Open in new window

0
 

Author Closing Comment

by:Whing Dela Cruz
ID: 36507198
Thanks! Its working....
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Import Data from Multiple Text Files in Excel 12 86
which modules are active in VB6 project? 6 51
CREATE DATABASE 3 35
asp classic find word in string and get its value 7 33
This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

756 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