Accedi con Microsoft
Accedi o crea un account.
Salve,
Seleziona un altro account.
Hai più account
Scegli l'account con cui vuoi accedere.

Ultimo aggiornamento: 10 aprile 2019

PROBLEMA

In Excel per Mac è stato introdotto un nuovo editor di Visual Basic nel mese di ottobre 2017. Il nuovo Visual Basic Editor presenta un problema quando si creano dichiarazioni di oggetti usando il menu a discesa nella parte superiore della finestra del codice.

Se si fa clic sull'elenco a discesa a sinistra e si sceglie un elemento nell'elenco, dovrebbe essere visualizzato un codice per l'evento selezionato nell'elenco a discesa a destra. È possibile eseguire altre selezioni nell'elenco a discesa a destra per creare codice aggiuntivo per gestire l'evento selezionato.

Editor VBE che mostra l'elenco a discesa per la selezione degli oggetti

Si verifica invece un errore e il codice non viene creato.

Errore di Microsoft Visual Basic: Gli usi delle variabili e il tipo di automazione non sono supportati in Visual Basic.

STATO: SOLUZIONE ALTERNATIVA

Scegliere una di queste soluzioni alternative per il problema:

SOLUZIONE ALTERNATIVA 1

È possibile eseguire un passaggio simile in un computer con Excel per Windows e quindi copiare il codice in Excel per Mac.

SOLUZIONE ALTERNATIVA 2

È possibile accedere a MSDN e trovare la sintassi per l'evento da usare, quindi digitare manualmente il codice nel progetto VBA. Questo articolo descrive gli eventi "cartella" di Microsoft Excel - Workbook Events.

SOLUZIONE ALTERNATIVA 3

Copiare il codice dell'evento appropriato dagli esempi seguenti e incollarlo nel progetto VBA. Per ogni evento, assicurarsi di copiare da "Private Sub..." a "End Sub", inclusi.

Private Sub Workbook_Activate()
End Sub

Private Sub Workbook_AddinInstall()
End Sub

Private Sub Workbook_AddinUninstall()
End Sub

Private Sub Workbook_AfterRemoteChange()
End Sub

Private Sub Workbook_AfterSave(ByVal Success As Boolean)
End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)
End Sub

Private Sub Workbook_BeforePrint(Cancel As Boolean)
End Sub

Private Sub Workbook_BeforeRemoteChange()
End Sub

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
End Sub

Private Sub Workbook_Deactivate()
End Sub

Private Sub Workbook_NewChart(ByVal Ch As Chart)
End Sub

Private Sub Workbook_NewSheet(ByVal Sh As Object)
End Sub

Private Sub Workbook_Open()
End Sub

Private Sub Workbook_PivotTableCloseConnection(ByVal Target As PivotTable)
End Sub

Private Sub Workbook_PivotTableOpenConnection(ByVal Target As PivotTable)
End Sub

Private Sub Workbook_RowsetComplete(ByVal Description As String, ByVal Sheet As String, ByVal Success As Boolean)
End Sub

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
End Sub

Private Sub Workbook_SheetBeforeDelete(ByVal Sh As Object)
End Sub

Private Sub Workbook_SheetBeforeDoubleClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean)
End Sub

Private Sub Workbook_SheetBeforeRightClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean)
End Sub

Private Sub Workbook_SheetCalculate(ByVal Sh As Object)
End Sub

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
End Sub

Private Sub Workbook_SheetDeactivate(ByVal Sh As Object)
End Sub

Private Sub Workbook_SheetFollowHyperlink(ByVal Sh As Object, ByVal Target As Hyperlink)
End Sub

Private Sub Workbook_SheetPivotTableAfterValueChange(ByVal Sh As Object, ByVal TargetPivotTable As PivotTable, ByVal TargetRange As Range)
End Sub

Private Sub Workbook_SheetPivotTableBeforeAllocateChanges(ByVal Sh As Object, ByVal TargetPivotTable As PivotTable, ByVal ValueChangeStart As Long, ByVal ValueChangeEnd As Long, Cancel As Boolean)
End Sub

Private Sub Workbook_SheetPivotTableBeforeCommitChanges(ByVal Sh As Object, ByVal TargetPivotTable As PivotTable, ByVal ValueChangeStart As Long, ByVal ValueChangeEnd As Long, Cancel As Boolean)
End Sub

Private Sub Workbook_SheetPivotTableBeforeDiscardChanges(ByVal Sh As Object, ByVal TargetPivotTable As PivotTable, ByVal ValueChangeStart As Long, ByVal ValueChangeEnd As Long)
End Sub

Private Sub Workbook_SheetPivotTableChangeSync(ByVal Sh As Object, ByVal Target As PivotTable)
End Sub

Private Sub Workbook_SheetPivotTableUpdate(ByVal Sh As Object, ByVal Target As PivotTable)
End Sub

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
End Sub

Private Sub Workbook_SheetTableUpdate(ByVal Sh As Object, ByVal Target As TableObject)
End Sub

Private Sub Workbook_Sync(ByVal SyncEventType As Office.MsoSyncEventType)
End Sub

Private Sub Workbook_WindowActivate(ByVal Wn As Window)
End Sub

Private Sub Workbook_WindowDeactivate(ByVal Wn As Window)
End Sub

Private Sub Workbook_WindowResize(ByVal Wn As Window)
End Sub

Private Sub Worksheet_Activate()

End Sub

Private Sub Worksheet_BeforeDelete()

End Sub

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)

End Sub

Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)

End Sub

Private Sub Worksheet_Calculate()

End Sub

Private Sub Worksheet_Change(ByVal Target As Range)

End Sub

Private Sub Worksheet_Deactivate()

End Sub

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)

End Sub

Private Sub Worksheet_LensGalleryRenderComplete()

End Sub

Private Sub Worksheet_PivotTableAfterValueChange(ByVal TargetPivotTable As PivotTable, ByVal TargetRange As Range)

End Sub

Private Sub Worksheet_PivotTableBeforeAllocateChanges(ByVal TargetPivotTable As PivotTable, ByVal ValueChangeStart As Long, ByVal ValueChangeEnd As Long, Cancel As Boolean)

End Sub

Private Sub Worksheet_PivotTableBeforeCommitChanges(ByVal TargetPivotTable As PivotTable, ByVal ValueChangeStart As Long, ByVal ValueChangeEnd As Long, Cancel As Boolean)

End Sub

Private Sub Worksheet_PivotTableBeforeDiscardChanges(ByVal TargetPivotTable As PivotTable, ByVal ValueChangeStart As Long, ByVal ValueChangeEnd As Long)

End Sub

Private Sub Worksheet_PivotTableChangeSync(ByVal Target As PivotTable)

End Sub

Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable)

End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

End Sub

Private Sub Worksheet_TableUpdate(ByVal Target As TableObject)

End Sub

Altre risorse

Icona esperti (cervello, ingranaggi)

Incontrare gli esperti

Connettersi con gli esperti, discutere le ultime novità di Excel, gli aggiornamenti e le procedure consigliate e leggere il blog.

Tech Community di Excel

Icona community

Ottenere assistenza nella community

Porre una domanda e ottenere soluzioni da operatori del supporto, MVP, tecnici e altri utenti di Excel.

Forum di Excel in Answers

Icona richiesta funzionalità (lampadina, idea)

Suggerire una nuova funzionalità

Microsoft apprezza i suggerimenti e il feedback sull'uso dei suoi prodotti. Gli utenti sono invitati a condividere idee e suggerimenti. Ogni segnalazione verrà presa in considerazione.

Invio feedback

Vedere anche

Correzioni o soluzioni alternative per recenti problemi di Excel per Mac

Serve aiuto?

Vuoi altre opzioni?

Esplorare i vantaggi dell'abbonamento e i corsi di formazione, scoprire come proteggere il dispositivo e molto altro ancora.

Le community aiutano a porre e a rispondere alle domande, a fornire feedback e ad ascoltare gli esperti con approfondite conoscenze.

Trovare soluzioni ai problemi comuni o ottenere assistenza da un agente di supporto.

Queste informazioni sono risultate utili?

Come valuti la qualità della lingua?
Cosa ha influito sulla tua esperienza?
Premendo Inviare, il tuo feedback verrà usato per migliorare i prodotti e i servizi Microsoft. L'amministratore IT potrà raccogliere questi dati. Informativa sulla privacy.

Grazie per il feedback!

×