Solved

How to read sign "/" on the textbox?

Posted on 2011-09-08
3
327 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 45

Accepted Solution

by:
Martin Liss earned 500 total points
Comment Utility
Dim strParts() As String

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

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

Assisted Solution

by:Martin Liss
Martin Liss earned 500 total points
Comment Utility
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
Comment Utility
Thanks! Its working....
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Add a task in Outlook from access 11 32
how to add field in my script 2 24
vb6 connector to mongodb 2 26
Pass through dll 2 34
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…
Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
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 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…

743 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

16 Experts available now in Live!

Get 1:1 Help Now