Return to Snippet

Revision: 42597
at March 20, 2011 22:48 by Ideandro


Updated Code
'+///////////////////////////////////////////////////////////////////+
'+===================================================================+
Public Sub GestoreErrori(err_Errori As Errors)
'+===================================================================+
' DESCRIZIONE:
' ARGOMENTI:
' RITORNA:
'+===================================================================+
' ___________________________________________________________________
'|> VARIABILI LOCALI

    Dim str_Errore As String
    Dim err_ErrCiclo As Error
  
  ' ___________________________________________________________________
  '|> Elenca l'insieme Errors e visualizza le proprietà
  '|> di ogni oggetto Error

    For Each err_ErrCiclo In err_Errori
      With err_ErrCiclo
        str_Errore = _
          "Errore #" & .Number & vbCr & vbCr & _
          "  " & .Description & vbCr & _
          "  (Origine: " & .Source & ")" & vbCr & vbCr & _
          "Premere F1 per consultare l'argomento " & .HelpContext & vbCr & _
          "  nel file " & .HelpFile & "."
      End With
      MsgBox str_Errore, vbApplicationModal + vbCritical + vbOKOnly, cnt_TitoloMsg & ": errore"
    Next
    
    Err.Clear
  
End Sub
'+===================================================================+
'+\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\+

'+///////////////////////////////////////////////////////////////////+
'+===================================================================+
Function NuovaFunzione()
'+===================================================================+
' DESCRIZIONE:
' ARGOMENTI:
' RITORNA:
'+===================================================================+
' ___________________________________________________________________
'|> ABILITO GESTIONE UTENTE DEGLI ERRORI

  On Error GoTo Errors_Handler
  
' ___________________________________________________________________
'|> VARIABILI LOCALI

    
  ' ___________________________________________________________________
  '|> Istruzioni
    
    
    
' ___________________________________________________________________
'|> ESCO DALLA ROUTINE

Exit_Routine:
  Exit Function
  
' ___________________________________________________________________
'|> GESTISCO GLI ERRORI

Errors_Handler:
  Call GestoreErrori(Errors)
  Resume Exit_Routine

End Function
'+===================================================================+
'+\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\+

Revision: 42596
at March 20, 2011 22:46 by Ideandro


Updated Code
'+///////////////////////////////////////////////////////////////////+
'+===================================================================+
Public Sub GestoreErrori(err_Errori As Errors)
'+===================================================================+
' DESCRIZIONE:
' ARGOMENTI:
' RITORNA:
'+===================================================================+
' ___________________________________________________________________
'|> VARIABILI LOCALI

    Dim str_Errore As String
    Dim err_ErrCiclo As Error
  
  ' ___________________________________________________________________
  '|> Elenca l'insieme Errors e visualizza le propriet� 
  '|> di ogni oggetto Error

    For Each err_ErrCiclo In err_Errori
      With err_ErrCiclo
        str_Errore = _
          "Errore #" & .Number & vbCr & vbCr & _
          "  " & .Description & vbCr & _
          "  (Origine: " & .Source & ")" & vbCr & vbCr & _
          "Premere F1 per consultare l'argomento " & .HelpContext & vbCr & _
          "  nel file " & .HelpFile & "."
      End With
      MsgBox str_Errore, vbApplicationModal + vbCritical + vbOKOnly, cnt_TitoloMsg & ": errore"
    Next
    
    Err.Clear
  
End Sub
'+===================================================================+
'+\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\+

'+///////////////////////////////////////////////////////////////////+
'+===================================================================+
Function NuovaFunzione()
'+===================================================================+
' DESCRIZIONE:
' ARGOMENTI:
' RITORNA:
'+===================================================================+
' ___________________________________________________________________
'|> ABILITO GESTIONE UTENTE DEGLI ERRORI

  On Error GoTo Errors_Handler
  
' ___________________________________________________________________
'|> VARIABILI LOCALI

    
  ' ___________________________________________________________________
  '|> Istruzioni
    
    
    
' ___________________________________________________________________
'|> ESCO DALLA ROUTINE

Exit_Routine:
  Exit Function
  
' ___________________________________________________________________
'|> GESTISCO GLI ERRORI

Errors_Handler:
  Call GestoreErrori(Errors)
  Resume Exit_Routine

End Function
'+===================================================================+
'+\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\+

Revision: 42595
at March 20, 2011 22:45 by Ideandro


Updated Code
'+///////////////////////////////////////////////////////////////////+
'+===================================================================+
Public Sub GestoreErrori(err_Errori As Errors)
'+===================================================================+
' DESCRIZIONE:
' ARGOMENTI:
' RITORNA:
'+===================================================================+
' ___________________________________________________________________
'|> VARIABILI LOCALI

    Dim str_Errore As String
    Dim err_ErrCiclo As Error
  
  ' ___________________________________________________________________
  '|> Elenca l'insieme Errors e visualizza le proprietà
  '|> di ogni oggetto Error

    For Each err_ErrCiclo In err_Errori
      With err_ErrCiclo
        str_Errore = _
          "Errore #" & .Number & vbCr & vbCr & _
          "  " & .Description & vbCr & _
          "  (Origine: " & .Source & ")" & vbCr & vbCr & _
          "Premere F1 per consultare l'argomento " & .HelpContext & vbCr & _
          "  nel file " & .HelpFile & "."
      End With
      MsgBox str_Errore, vbApplicationModal + vbCritical + vbOKOnly, cnt_TitoloMsg & ": errore"
    Next
    
    Err.Clear
  
End Sub
'+===================================================================+
'+\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\+

'+///////////////////////////////////////////////////////////////////+
'+===================================================================+
Function NuovaFunzione()
'+===================================================================+
' DESCRIZIONE:
' ARGOMENTI:
' RITORNA:
'+===================================================================+
' ___________________________________________________________________
'|> ABILITO GESTIONE UTENTE DEGLI ERRORI

  On Error GoTo Errors_Handler
  
' ___________________________________________________________________
'|> VARIABILI LOCALI

    
  ' ___________________________________________________________________
  '|> Istruzioni
    
    
    
' ___________________________________________________________________
'|> ESCO DALLA ROUTINE

Exit_Routine:
  Exit Function
  
' ___________________________________________________________________
'|> GESTISCO GLI ERRORI

Errors_Handler:
  Call GestoreErrori(Errors)
  Resume Exit_Routine

End Function
'+===================================================================+
'+\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\+

Revision: 42594
at March 8, 2011 02:37 by Ideandro


Initial Code
'+///////////////////////////////////////////////////////////////////+
'+===================================================================+
Public Sub GestoreErrori(err_Errori As Errors)
'+===================================================================+
' DESCRIZIONE:
' ARGOMENTI:
' RITORNA:
'+===================================================================+
' ___________________________________________________________________
'|> VARIABILI LOCALI

    Dim str_Errore As String
    Dim err_ErrCiclo As Error
  
  ' ___________________________________________________________________
  '|> Elenca l'insieme Errors e visualizza le proprietà
  '|> di ogni oggetto Error

    For Each err_ErrCiclo In err_Errori
      With err_ErrCiclo
        str_Errore = _
          "Errore #" & .Number & vbCr & vbCr & _
          "  " & .Description & vbCr & _
          "  (Origine: " & .Source & ")" & vbCr & vbCr & _
          "Premere F1 per consultare l'argomento " & .HelpContext & vbCr & _
          "  nel file " & .HelpFile & "."
      End With
      MsgBox str_Errore, vbApplicationModal + vbCritical + vbOKOnly, cnt_TitoloMsg & ": errore"
    Next
    
    Err.Clear
  
End Sub
'+===================================================================+
'+\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\+

'+///////////////////////////////////////////////////////////////////+
'+===================================================================+
Function NuovaFunzione()
'+===================================================================+
' DESCRIZIONE:
' ARGOMENTI:
' RITORNA:
'+===================================================================+
' ___________________________________________________________________
'|> ABILITO GESTIONE UTENTE DEGLI ERRORI

  On Error GoTo Errors_Handler
  
' ___________________________________________________________________
'|> VARIABILI LOCALI

    
  ' ___________________________________________________________________
  '|> Istruzioni
    
    
    
' ___________________________________________________________________
'|> ESCO DALLA ROUTINE

Exit_Routine:
  Exit Function
  
' ___________________________________________________________________
'|> GESTISCO GLI ERRORI

Errors_Handler:
  Call GestoreErrori(Errors)
  Resume Exit_Routine

End Function
'+===================================================================+
'+\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\+

Initial URL

                                

Initial Description
Per creare una nuova funzione completa di un gestore errori.

Initial Title
Nuova funzione con gestione errori

Initial Tags
function

Initial Language
Visual Basic