Propósito

✔ Programação GLOBAL® - Quaisquer soluções e/ou desenvolvimento de aplicações pessoais, ou da empresa, que não constem neste Blog devem ser tratados como consultoria freelance. Queiram contatar-nos: brazilsalesforceeffectiveness@gmail.com | ESTE BLOG NÃO SE RESPONSABILIZA POR QUAISQUER DANOS PROVENIENTES DO USO DOS CÓDIGOS AQUI POSTADOS EM APLICAÇÕES PESSOAIS OU DE TERCEIROS.

Mostrando postagens com marcador ordena. Mostrar todas as postagens
Mostrando postagens com marcador ordena. Mostrar todas as postagens

VBA Excel - Ordena worksheets da planilha - Sort All Sheets in a Workbook

Inline image 1

Podemos ordenar todas as Sheets duma seqüência alfabética.

Sub SrtShs()
Dim iSheet As Long, iBefore As Long 
For iSheet = 1 To ActiveWorkbook.Sheets.Count     
    Let Sheets(iSheet).Visible = True 
    For iBefore = 1 To iSheet - 1       
        If UCase(Sheets(iBefore).Name) & UCase(Sheets(iSheet).Name) Then  
                      ActiveWorkbook.Sheets(iSheet).Move 
          Before:=ActiveWorkbook.Sheets(iBefore)         
          Exit For       
        End If     
    Next iBefore   
Next iSheet 
End Sub







Reference:

Inspiration:

TagsVBA, Excel, wrap, sheet, sheets, ws, insert, sort, ordena


VBA Excel - Ordena worksheets da planilha - Sort All Sheets in a Workbook


Podemos ordenar todas as planilhas numa seqüência alfabética, enquanto os ícones por worksheet não vem.

Sub SrtShs()
Dim iSheet As Long, iBefore As Long 

For iSheet = 1 To ActiveWorkbook.Sheets.Count     
    Let Sheets(iSheet).Visible = True 

    For iBefore = 1 To iSheet - 1       
        If UCase(Sheets(iBefore).Name) & UCase(Sheets(iSheet).Name) Then  
                    ActiveWorkbook.Sheets(iSheet).Move 

          Before:=ActiveWorkbook.Sheets(iBefore)         

          Exit For       
        End If     

    Next iBefore   
Next iSheet 

End Sub

Tags: Excel, worksheets, sheets, ws, insert, inserindo, sort, ordena


André Luiz Bernardes
A&A® - Work smart, not hard.

diHITT - Notícias