Código Maiusculas e Minusculas

Este código faz com que você coloque uma seleção em maiusculas ou minusculas, selecionando um intervalo o código irá transformar tudo em maiusculo ou minusculo.

 

Transformar em Maiusculo

Sub Maiusculas()
    Dim Celula As Range
    Dim xSel As Long, x  As Long
    xSel = Selection.Count
    For Each Celula In Selection
        x = x + 1
        Celula.Value = UCase(Celula.Text)
    Next
End Sub

 

Transformar em Minusculo

Sub Minusculas()
    Dim Celula  As Range
    Dim xSel As Long, x  As Long
    xSel = Selection.Count
    For Each Celula In Selection
        x = x + 1
        Celula.Value = LCase(Celula.Text)
    Next
End Sub

 

Voltar