Click here to Skip to main content
11,409,450 members (65,831 online)
Rate this: bad
good
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 22: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 at 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
0 Sergey Alexandrovich Kryukov 8,676
1 OriginalGriff 6,885
2 Maciej Los 3,322
3 Abhinav S 3,238
4 Peter Leow 3,034


Advertise | Privacy | Mobile
Web01 | 2.8.150414.5 | Last Updated 5 Jun 2012
Copyright © CodeProject, 1999-2015
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