Coutnting the char. & string in text area.?

Posted on 2001-09-14
Last Modified: 2010-05-02

       I have to count the strings & char entered by the user in the text area on cliking the button.
Means to say when the button is clicked  a list box shows the tollal count for all characters entered in the text area like A=78 , n=68 , .=90 & so on .
Plz give me the solution to do this.
Thanx for giving me answer.
Question by:arzoo
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

Accepted Solution

Bahnass earned 50 total points
ID: 6484380
dim AllAscii(256)

for I = 1 to len(Text1.text)
    AllAscii(asc(mid(AllAscii(I))))=    AllAscii(asc(mid(AllAscii(I))))+1


'   then to get that array
for i =1 to 255
    ?     AllAscii(I),
LVL 44

Expert Comment

ID: 6484391
along the same line

Function AscVal(strInput As String)
Dim RetVal As String, I as long

For I = 1 To Len(strInput)
    RetVal = RetVal & Asc(Mid(strInput, I, 1))
Next I

AscVal = RetVal
End Function

in your code you can use

lngTextValue = AscVal(Textbox1.Text)


Expert Comment

ID: 6484392
'Here is the solution
'u can put the cnt any where u want,like list box or text

Private Sub Command1_Click()

Dim cnt As Integer
Dim i As Integer

For i = 1 To Len(Text1.Text)
    cnt = cnt + Asc(Mid(Text1.Text, i, 1))

MsgBox cnt

End Sub

Expert Comment

ID: 6484408
Questions Asked 9
Last 10 Grades Given  
Question Grading Record 0 Answers Graded / 0 Answers Received
Questions Answered 0
Last 10 Grades Received  

arzoo u have bad credentials,be prompt.
I also suggest all who read,check their crdentials so thatu will spare ur precious time for a worthy person

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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