VB Code:
  1. Private Sub Form_Load()
  2.  
  3.     On Error GoTo ErrorHandler
  4.  
  5. code here
  6. code here
  7. call function1
  8. call function2
  9.  
  10. ErrorHandler:
  11.     MsgBox ErrorPrefix & "Error id: " & err & ", " & Error, vbCritical, version & " - error!"
  12. end sub

function1 and function2 have error handling like that too

but whe i start my form up, it keeps msgboxing but the errorid and message are blank