22/01/2012, 22:38
Yandemir
aşağıdaki fonksiyonu kullanın
Büyük harfte küçük harfte girseniz Capitalize hale getiriyor. Türkçe harflerde dahil.
Büyük harfte küçük harfte girseniz Capitalize hale getiriyor. Türkçe harflerde dahil.
Function IlkHarfBuyut(metin As String) As String
metin = Replace(metin, "A", "a", , , vbBinaryCompare)
metin = Replace(metin, "B", "b", , , vbBinaryCompare)
metin = Replace(metin, "C", "c", , , vbBinaryCompare)
metin = Replace(metin, "Ç", "ç", , , vbBinaryCompare)
metin = Replace(metin, "D", "d", , , vbBinaryCompare)
metin = Replace(metin, "E", "e", , , vbBinaryCompare)
metin = Replace(metin, "F", "f", , , vbBinaryCompare)
metin = Replace(metin, "G", "g", , , vbBinaryCompare)
metin = Replace(metin, "Ğ", "ğ", , , vbBinaryCompare)
metin = Replace(metin, "H", "h", , , vbBinaryCompare)
metin = Replace(metin, "I", "ı", , , vbBinaryCompare)
metin = Replace(metin, "İ", "i", , , vbBinaryCompare)
metin = Replace(metin, "J", "j", , , vbBinaryCompare)
metin = Replace(metin, "K", "k", , , vbBinaryCompare)
metin = Replace(metin, "L", "l", , , vbBinaryCompare)
metin = Replace(metin, "M", "m", , , vbBinaryCompare)
metin = Replace(metin, "N", "n", , , vbBinaryCompare)
metin = Replace(metin, "O", "o", , , vbBinaryCompare)
metin = Replace(metin, "Ö", "ö", , , vbBinaryCompare)
metin = Replace(metin, "P", "p", , , vbBinaryCompare)
metin = Replace(metin, "Q", "q", , , vbBinaryCompare)
metin = Replace(metin, "R", "r", , , vbBinaryCompare)
metin = Replace(metin, "S", "s", , , vbBinaryCompare)
metin = Replace(metin, "Ş", "ş", , , vbBinaryCompare)
metin = Replace(metin, "T", "t", , , vbBinaryCompare)
metin = Replace(metin, "U", "u", , , vbBinaryCompare)
metin = Replace(metin, "Ü", "ü", , , vbBinaryCompare)
metin = Replace(metin, "V", "v", , , vbBinaryCompare)
metin = Replace(metin, "X", "x", , , vbBinaryCompare)
metin = Replace(metin, "Y", "y", , , vbBinaryCompare)
metin = Replace(metin, "Z", "z", , , vbBinaryCompare)
metin = Replace(metin, " a", " A")
metin = Replace(metin, " b", " B")
metin = Replace(metin, " c", " C")
metin = Replace(metin, " ç", " Ç")
metin = Replace(metin, " d", " D")
metin = Replace(metin, " e", " E")
metin = Replace(metin, " f", " F")
metin = Replace(metin, " g", " G")
metin = Replace(metin, " ğ", " Ğ")
metin = Replace(metin, " h", " H")
metin = Replace(metin, " ı", " I")
metin = Replace(metin, " i", " İ")
metin = Replace(metin, " j", " J")
metin = Replace(metin, " k", " K")
metin = Replace(metin, " l", " L")
metin = Replace(metin, " m", " M")
metin = Replace(metin, " n", " N")
metin = Replace(metin, " o", " O")
metin = Replace(metin, " ö", " Ö")
metin = Replace(metin, " p", " P")
metin = Replace(metin, " q", " Q")
metin = Replace(metin, " r", " R")
metin = Replace(metin, " s", " S")
metin = Replace(metin, " ş", " Ş")
metin = Replace(metin, " t", " T")
metin = Replace(metin, " u", " U")
metin = Replace(metin, " ü", " Ü")
metin = Replace(metin, " v", " V")
metin = Replace(metin, " x", " X")
metin = Replace(metin, " y", " Y")
metin = Replace(metin, " z", " Z")
If Left(metin, 1) = "i" Then metin = "İ" & Mid(metin, 2): GoTo Cik
If Left(metin, 1) = "ı" Then metin = "I" & Mid(metin, 2): GoTo Cik
If Left(metin, 1) = "ş" Then metin = "Ş" & Mid(metin, 2): GoTo Cik
If Left(metin, 1) = "ğ" Then metin = "Ğ" & Mid(metin, 2): GoTo Cik
If Left(metin, 1) = "ü" Then metin = "Ü" & Mid(metin, 2): GoTo Cik
If Left(metin, 1) = "ö" Then metin = "Ö" & Mid(metin, 2): GoTo Cik
If Left(metin, 1) = "ç" Then metin = "Ç" & Mid(metin, 2): GoTo Cik
metin = UCase(Mid(metin, 1, 1)) & Mid(metin, 2)
Cik:
IlkHarfBuyut = metin
End Function