VBA Bir Stringi Ters Çevirmek

"VBA" Programlama dilinde "Bir Stringi Ters Çevirmek" ile ilgili örnek kod aşağıda gösterilmiştir.

Public Function reverseWords(sentence As String) As String
    Dim words() As String
    words = Split(sentence, " ")
    Dim newWordList() As String
    ReDim newWordList(UBound(words))
    Dim i As Integer
    For i = 0 To UBound(words)
        newWordList(i) = StrReverse(words(i))
    Next i
    reverseWords = Join(newWordList, " ")
End Function

Sub testReverseWords()
    Dim str1 As String
    str1 = "Yazilim Güzeldir."
    MsgBox reverseWords(str1)
End Sub



İlginizi Çekebilir

VBA Text Wrap Kaldırma

VBA Tüm Birleştirilen Hücreleri Kaldırmak

VBA Bir Sayının Kuvvetinin Hesaplanması

VBA Bir Sayının Mutlak Değerinin Hesaplanması

VBA While Döngüsü İle 10 Sayının Ortalamasını Bulma Örneği