Sto usando gli strumenti del foglio di lavoro, crea un foglio indice con i pulsanti (VBA). Quando seleziono uno dei pulsanti, il codice viene eseguito come dovrebbe, tranne per il fatto che continua a visualizzare "Impossibile attivare ODBC. Potrebbe essere stato eliminato o rinominato". errore. Fa lo stesso per tutti i fogli. Qual è il problema?? Il codice è il seguente:
Sub GoToButton1_Click()
On Error Resume Next
Fogli ("ODBC"). Attiva
If Err <> 0 Then MsgBox "Impossibile attivare ODBC. Potrebbe essere stato eliminato o rinominato."
On Error GoTo 0
End Sub
Sub GoToButton2_Click()
On Error Resume Next
Fogli ("Master"). Attiva
If Err <> 0 Then MsgBox "Impossibile attivare il master. Potrebbe essere stato eliminato o rinominato."
On Error GoTo 0
End Sub
Sub GoToButton3_Click()
On Error Resume Next
Fogli ("TUTTI"). Attiva
If Err <> 0 Then MsgBox "Impossibile attivare TUTTO. Potrebbe essere stato eliminato o rinominato."
On Error GoTo 0
End Sub
Sub GoToButton4_Click()
On Error Resume Next
Fogli("PAGATO").Attiva
If Err <> 0 Then MsgBox "Impossibile attivare PAGATO. Potrebbe essere stato eliminato o rinominato."
On Error GoTo 0
End Sub
Sub GoToButton5_Click()
On Error Resume Next
Fogli("REGOLATO").Attiva
If Err <> 0 Then MsgBox "Impossibile attivare SETTLED. Potrebbe essere stato eliminato o rinominato."
On Error GoTo 0
End Sub
Sub GoToButton6_Click()
On Error Resume Next
Fogli("CHIUSO").Attiva
If Err <> 0 Then MsgBox "Impossibile attivare CLOSED. Potrebbe essere stato eliminato o rinominato."
On Error GoTo 0
End Sub
Sub GoToButton7_Click()
On Error Resume Next
Fogli ("NON VIABLE"). Attiva
If Err <> 0 Then MsgBox "Impossibile attivare NON VIABLE. Potrebbe essere stato eliminato o rinominato."
On Error GoTo 0
End Sub
Sub GoToButton8_Click()
On Error Resume Next
Fogli("LEGAL").Attiva
If Err <> 0 Then MsgBox "Impossibile attivare LEGAL. Potrebbe essere stato eliminato o rinominato."
On Error GoTo 0
End Sub
Sub GoToButton9_Click()
On Error Resume Next
Fogli("SOMMARIO").Attiva
If Err <> 0 Then MsgBox "Impossibile attivare il SOMMARIO. Potrebbe essere stato eliminato o rinominato."
On Error GoTo 0
End Sub
Sub GoToButton1_Click()
On Error Resume Next
Fogli ("ODBC"). Attiva
If Err <> 0 Then MsgBox "Impossibile attivare ODBC. Potrebbe essere stato eliminato o rinominato."
On Error GoTo 0
End Sub
Sub GoToButton2_Click()
On Error Resume Next
Fogli ("Master"). Attiva
If Err <> 0 Then MsgBox "Impossibile attivare il master. Potrebbe essere stato eliminato o rinominato."
On Error GoTo 0
End Sub
Sub GoToButton3_Click()
On Error Resume Next
Fogli ("TUTTI"). Attiva
If Err <> 0 Then MsgBox "Impossibile attivare TUTTO. Potrebbe essere stato eliminato o rinominato."
On Error GoTo 0
End Sub
Sub GoToButton4_Click()
On Error Resume Next
Fogli("PAGATO").Attiva
If Err <> 0 Then MsgBox "Impossibile attivare PAGATO. Potrebbe essere stato eliminato o rinominato."
On Error GoTo 0
End Sub
Sub GoToButton5_Click()
On Error Resume Next
Fogli("REGOLATO").Attiva
If Err <> 0 Then MsgBox "Impossibile attivare SETTLED. Potrebbe essere stato eliminato o rinominato."
On Error GoTo 0
End Sub
Sub GoToButton6_Click()
On Error Resume Next
Fogli("CHIUSO").Attiva
If Err <> 0 Then MsgBox "Impossibile attivare CLOSED. Potrebbe essere stato eliminato o rinominato."
On Error GoTo 0
End Sub
Sub GoToButton7_Click()
On Error Resume Next
Fogli ("NON VIABLE"). Attiva
If Err <> 0 Then MsgBox "Impossibile attivare NON VIABLE. Potrebbe essere stato eliminato o rinominato."
On Error GoTo 0
End Sub
Sub GoToButton8_Click()
On Error Resume Next
Fogli("LEGAL").Attiva
If Err <> 0 Then MsgBox "Impossibile attivare LEGAL. Potrebbe essere stato eliminato o rinominato."
On Error GoTo 0
End Sub
Sub GoToButton9_Click()
On Error Resume Next
Fogli("SOMMARIO").Attiva
If Err <> 0 Then MsgBox "Impossibile attivare il SOMMARIO. Potrebbe essere stato eliminato o rinominato."
On Error GoTo 0
End Sub