Click here to Skip to main content
12,448,003 members (92,907 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: VB COM DLL
Hello friends,

I created a sample dll namely SimpleCalculator.dll using VB6, and i registered and I tested the same dll using sample_testpage.asp. It works good in asp classic page.

Now I want to use the same dll in another vb project. For that

I created a new project and added a reference through project-->reference--> browsed the dll file.

The methods that i added in dll class files are popping up successfully.

But when i ran the project, error is raised as "Object variable or With block variable
not set".

I do not know where i am lacking.

kindly advise.

With regards

R.K.PRABAKAR
Posted 3-Jun-12 21:31pm
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

You didn't post your code, anyway check the below link for the solution(s)

Object variable or With block variable not set (Error 91) - Visual Basic for Applications Reference[^]
  Permalink  
Comments
rk_prabakar 5-Jun-12 2:22am
   
Thanks buddy........
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

I just tried to create an object just like

Dim Obj as Class1

it throws that error, then i tried the following code for object creation then it works fine

Dim Obj as new Class1

Thanks folks !!!
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160811.3 | Last Updated 5 Jun 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100