Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 the preferred way to create a clustered and non-clustered index? Which index should you create first the clustered or non-clustered?

852


What are the restrictions applicable while creating views? : SQL Server Architecture

981


What are the different methods available under sqlcommand class to access the data?

1060


What is GUID in sql server?

1094


Why we use functions in sql server?

1012


Why do we use trigger?

917


What is pessimistic concurrency?

924


What is set nocount on and what is set nocount off?

886


What are the differences between lost updates and uncommitted dependencies?

1015


What is a select query statement in ms sql server?

1009


How many types of local tables are there in sql server?

889


As a general practice, it is recommended to have dbo be the owner of all database objects however, in your database you find number of tables owned by a user other than dbo, how could you fix this?

991


How efficient you are in oracle and SQL server?

1090


What is the default value of an integer data type in sql server 2005?

912


What is forward - only cursors / read only cursor?

1023