How can count the string ?
for ex: If i have string like 'bhaskar' then i need like
b:1
h:1
a:2
s:1
k:1
r:1

please give any idea on that


Answer Posted / major

Private Sub Form_Load()
Dim Str As String
Str = "Bhaskar"
Fetch Str
End Sub

Public Sub Fetch(Str As String)
Dim StrNew As String
StrVal1 = Str: StrNew = Str
While StrNew <> ""
StrNew = Replace(Str, Mid(Str, 1, 1), "")
Debug.Print Mid(Str, 1, 1) & Len(Str) - Len(StrNew)
Str = StrNew
Wend
End Sub

Is This Answer Correct ?    1 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is raid and what are different types of raid configurations? : Sql server database administration

531


What are different types of table joins?

551


How to deploy the Report?

93


What are data regions?

90


How to add more data to the testing table in ms sql server?

544






What is row-level compre?

537


What is an expensive query?

528


What is normalization 1nf 2nf 3nf?

620


What is Dependency Injection and provide example?

603


Explain what role entity and relationship play in an ER diagram.

565


Difference between aggregate functions of sql?

645


What is difference between views and tables?

457


What does it mean to normalize data?

508


Can you explain what are commit and rollback in sql?

480


Can group functions be used in the order by clause in ms sql server?

580