Cerca
  • Via Sergio Forti, 23 00144 Roma
  • +39 340 499 7705 | +39 06 830 893 06
ML Training
    • Chi siamo
      • Formazione Finanziata
      • Lavora con noi
    • Informatica
          • Office
            • Excel
            • PowerPoint
            • Access
            • Word
            • Project
            • Outlook
            • SharePoint
            • Power Apps
            • Power Automate
          • Business Intelligence
            • Excel Power Query
            • Excel Power Pivot
            • Power BI
            • SQL
            • Qlik View
            • Qlik Sense
            • R
            • Knime
            • QGIS
          • Intelligenza Artificiale
            • ChatGPT
            • Copilot
          • Web Marketing
            • Analisi Sito
            • SEO
            • Campagne Google ADS
            • Social Media Marketing
    • Soft Skills
      • Time Management
      • Project Management
      • Lavorare in team
      • Problem Solving
      • Leadership
      • Comunicazione Efficace
      • Tecniche di Vendita
      • Delega delle attività
      • Gestione delle riunioni
      • Gestione dei conflitti
      • Gestione del cambiamento
      • Parlare in pubblico
      • Mappatura dei Processi Aziendali
    • Inglese
      • Inglese Lingua Generale
      • Inglese Lingua Settoriale
    • Clienti
    • Blog
    • Contatti
    • Chi siamo
      • Formazione Finanziata
      • Lavora con noi
    • Informatica
          • Office
            • Excel
            • PowerPoint
            • Access
            • Word
            • Project
            • Outlook
            • SharePoint
            • Power Apps
            • Power Automate
          • Business Intelligence
            • Excel Power Query
            • Excel Power Pivot
            • Power BI
            • SQL
            • Qlik View
            • Qlik Sense
            • R
            • Knime
            • QGIS
          • Intelligenza Artificiale
            • ChatGPT
            • Copilot
          • Web Marketing
            • Analisi Sito
            • SEO
            • Campagne Google ADS
            • Social Media Marketing
    • Soft Skills
      • Time Management
      • Project Management
      • Lavorare in team
      • Problem Solving
      • Leadership
      • Comunicazione Efficace
      • Tecniche di Vendita
      • Delega delle attività
      • Gestione delle riunioni
      • Gestione dei conflitti
      • Gestione del cambiamento
      • Parlare in pubblico
      • Mappatura dei Processi Aziendali
    • Inglese
      • Inglese Lingua Generale
      • Inglese Lingua Settoriale
    • Clienti
    • Blog
    • Contatti
ML Training > Blog > Blog > VBA Excel: ordinare i fogli

VBA Excel: ordinare i fogli

  • 11 Agosto 2023
  • Pubblicato da: Marco Lauricella
  • Categoria: Blog
Nessun commento
Letto: 114

 

Per ordinare i fogli in senso crescente in base al nome è possibile utilizzare la routine seguente che, a seconda delle necessità, può essere eseguita:

  1. da un pulsante posto:
    • sulla barra di accesso rapido
    • sulla barra multifunzione
    • sul foglio stesso
  2. al caricamento del file sfruttando l’evento Private Sub Workbook_Open()

Dim foglio As Worksheet
Dim prec As String
Dim corr As String
Dim sposta As Boolean
Dim primo As Boolean
Dim i As Integer
sposta = True
While sposta = True
   primo = True
   sposta = False
   prec = ""
   corr = ""
   For Each foglio In Worksheets
      If primo Then
         corr = LCase(foglio.Name)
         primo = False
      Else
         prec = corr
         corr = LCase(foglio.Name)
      End If
      If prec <> "" Then
         If corr < prec Then
            sposta = True
            foglio.Move Before:=Sheets(prec)
         End If
      End If
   Next
Wend

Segui ML Training su: Facebook – LinkedIn

 

VBA Excel
Letto: 114

Ultimi articoli

GESTIONE DEI COLLEGAMENTI
Blog ,
Importare dati in Excel da PDF
Blog ,
Calcolo della Media Ponderata e Deviazione Standard
Blog ,
Gestire i collegamenti ipertestuali in PowerPoint
Blog ,

Tags

Access Excel PowerPoint Time Management VBA Excel Word

Corsi

INFORMATICA
SOFT SKILLS
INGLESE

Contatti

  • Sergio Forti, 23 | 00144 Roma
  • Mob.: +39 340 499 7705
    Tel.: +39 06 830 893 06
  • info@mltraining.it

Sedi

Sede Roma

Viale Luca Gaurico 9
00143 - Roma

Sede Milano

Piazzale Biancamano 8
20121 - Milano

Richiedi informazioni

CONTATTACI

© ML TRAINING | P.Iva 13135901000 - Privacy - Cookie