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

Do you know what is raid and what are different types of raid configurations? : SQL Server Architecture

1066


What are the system database in sql server 2008?

1035


How to provide default values to function parameters?

1140


How to drop an existing table with "drop table" statements in ms sql server?

1086


What is microsoft sql server?

979


How to view existing indexes on an given table using sys.indexes?

1091


What is side by side migration in sql server?

1107


Are connections to sql server encrypted?

1004


Can you please differentiate between a primary key and a unique key?

1009


Explain the third normal form(3nf)?

945


Explain what is raid and what are different types of raid levels?

1027


What is #temp and @table variable in SQL server?

1094


Explain left outer join and right outer join?

1040


How is a full-text index updated?

954


What is the stuff and how does it differ from the replace function?

1131