P. 1
Awal Kata Kapital

Awal Kata Kapital

|Views: 8|Likes:
Published by subandiwahyudi08
algoritma
algoritma

More info:

Published by: subandiwahyudi08 on Jan 19, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

01/19/2011

pdf

text

original

Awal Kata Kapital

'Deskripsi: Menampilkan huruf pertama dari setiap kata dalam suatu kalimat ' menjadi huruf besar/kapital. 'Pembuat : Masino Sinaga (masino_sinaga@posindonesia.co.id). 'Persiapan: 1. Buat 1 Project baru dengan 1 Form dan 1 TextBox ' 2. Copy-kan coding berikut ke dalam editor form yang bertalian. '-------------------------------------------------------------------------Public Function AwalKataKapital(strKalimat As String) Dim i As Integer 'By Masino Sinaga, Bandung, 5 Juli 2002 Dim Temp As String Dim Lokasi As Integer Dim huruf As String * 1 Temp$ = "" For i% = 1 To Len(strKalimat) huruf = Chr(Asc(Mid(strKalimat, i%, 1))) If Len(Trim(huruf)) < 1 Then Lokasi% = i% + 1 End If If i% = Lokasi% Or i% = 1 Then Temp$ = Temp$ + UCase(Chr(Asc(Mid(strKalimat, i%, 1)))) Else Temp$ = Temp$ + LCase(Chr(Asc(Mid(strKalimat, i%, 1)))) End If Next i AwalKataKapital = Temp$ End Function Private Sub Text1_Change() Dim posisi As Integer posisi = Text1.SelStart Text1.Text = AwalKataKapital(Text1.Text) Text1.SelStart = posisi End Sub

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->