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 Dosya Silme

VBA Bir Sayının Kuvvetinin Hesaplanması

VBA Tüm Satırları Auto Fit Yapmak

VBA Text Wrap Kaldırma

VBA Sinüs Değerini Hesaplama