Using Visual Basic

Below is code in Visual basic, It works on Notes 5.0, but does not works on Notes 6.0. How to fix ?

Error in "Call ns.Initialize ". Active Component can’t create object.

'~~ in VBA, Tool ->References Add below

'~~ Lotus Domino Object – c:\program files\notes\domobj.tl

Dim ndb As NOTESDATABASE

Dim ns As New NotesSession

Dim nvw As NotesView

Dim nvc As NotesViewColumn

Dim nvec As NotesViewEntryCollection

Dim ndoc As NotesDocument

Dim lngCount As Long

Dim varViews As Variant

Private Sub cmdConn_Click()

’ On Error GoTo errHandler

Dim listView() As String

Set ns = Nothing

Set ndb = Nothing

Call ns.Initialize                    ' For VBA using ns.Initialize



Set ndb = ns.GetDatabase(txtIP, txtName)

…

END

Subject: Using Visual Basic

I get the problem.nlsxbe is a COM dll that can be used on both client and server. Depending on which version you are using you may have to manually register the dll before you can use it. Run “regsvr32 nlsxbe.dll” from the program directory.