ND _
   ) As Long
Private Declare Function CLSIDFromString Lib "ole32.dll" (lpsz As Byte, pclsid
 As GUID) As Long

Public Function RegTypelib(sLib As String, ByVal bState As Boolean) As Long
Dim suLib() As Byte
Dim errOK As Long
Dim tlb As Object
   If bState Then
      ' Basic automatically translates strings to Unicode Byte arrays
      ' but doesn't null-terminate, so you must do it yourself
      suLib = sLib &amp; vbNullChar
      ' Pass first byte of array
      errOK = LoadTypeLib(suLib(0), tlb)
   