Private Sub cmdAggiorna_Click() Dim I As Variant lstIndice.Clear For Each I In Worksheets If I.Name <> "Indice" Then lstIndice.AddItem I.Name End If Next I End Sub Private Sub cmdEsci_Click() 'Disattiva Messaggi Application.DisplayAlerts = False 'Salva File ActiveWorkbook.Save If Workbooks.Count > 1 Then 'Chiudi File ActiveWorkbook.Close Else 'Chiudi Excels Application.Quit End If 'Attiva Messaggio Application.DisplayAlerts = True End Sub Private Sub lstIndice_DblClick(ByVal Cancel As MSForms.ReturnBoolean) Worksheets(lstIndice.Value).Activate End Sub Private Sub Worksheet_Activate() Dim I As Variant lstIndice.Clear For Each I In Worksheets If I.Name <> "Indice" Then lstIndice.AddItem I.Name End If Next I End Sub
If I.Name <> "Indice" And I.Name <> "FoglioProva" Then lstIndice.AddItem I.Name End If