Click here to Skip to main content
13,000,127 members (55,136 online)
Rate this:
Please Sign up or sign in to vote.
See more:
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

Posted 3-Jun-12 21:31pm
Rate this: bad
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[^]
rk_prabakar 5-Jun-12 2:22am
Thanks buddy........
Rate this: bad
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 !!!

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
Web01 | 2.8.170624.1 | Last Updated 5 Jun 2012
Copyright © CodeProject, 1999-2017
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