Solved

How to read sign "/" on the textbox?

Posted on 2011-09-08
3
329 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
  • 2
3 Comments
 
LVL 46

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 46

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how to add fields in script 20 51
Getting warning: You are about to delete 1 row(s) 9 43
Recursive folder search vbscript 7 40
How to Add / Edit Windows Menu 4 50
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…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
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…

914 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now