ry oTemp, 0&amp;, 4
   ' OK, hit the End button if you must
End Property


Public Function WinAPIError(ByVal lLastDLLError As Long) As String
Dim sBuff As String
Dim lCount As Long
   
   ' Return the error message associated with LastDLLError:
   sBuff = String$(256, 0)
   lCount = FormatMessage( _
      FORMAT_MESSAGE_FROM_SYSTEM Or FORMAT_MESSAGE_IGNORE_INSERTS, _
      0, lLastDLLError, 0&amp;, sBuff, Len(sBuff), ByVal 0)
   If lCount &lt;&gt; 0 Then
      WinAPIError = Left$(sBuff, lCount)
   End If

E