
Object Variable not set , Run Time error 91, please Help
Hi Guys,
I got this message when I try to call one of the function that I have in my
dll . I set all properties but when I call method I got this error , I set
reference to my dll . here is my code
Private Sub Command1_Click()
Dim rs
Dim KB
Set Conn = CreateObject("ADODB.Connection")
Set rs = CreateObject("ADODB.Recordset")
Set KB = CreateObject("KBAPP.KB_App")
Conn.ConnectionString = " Provider=SQLOLEDB.1;Integrated
Security=SSPI;Persist Security Info=False;Initial Catalog=KB_Test;Data
Source=zeus "
Conn.Open
With KB
.ArtFormat = 1
.ArtType = 2
.BType = "All"
.Cat = "All"
.PubDate = 44
.SearchBy = 1
.SearchVal = "beef"
.Seg = "All"
.SessionID = "1270013200169142997V3P771I1SG3Z9FW66N1QK"
.SubCat = "All"
.SearchLogic = 1
End With
Set rs = KB.GetArt ''' <<<------ I GOT THIS ERROR HERE
End Sub
Any suggestion ?
Thanks in advance,
Sam